Page 1 of 1

Characters after URL

Posted: Tue Mar 02, 2010 12:06 pm
by Andycal
I'm trying to launch a URL with the following command:

Code: Select all

launch URL tFilename
tFilename contains a path to the file on a server and in the variable inspector it looks absolutley fine, however when it launches a browser to view the file, it's adding the characters "%0D" to the end of the URL and the browser is giving me a file not found error.

How can I remove those two odd characters??

Andy.

Re: Characters after URL

Posted: Tue Mar 02, 2010 5:07 pm
by Janschenkel
It means there's a trailing return character in your URL -which gets replaced by the "%0D" you're seeing to make it a 'valid' URL for your browser.

Jan Schenkel.

Re: Characters after URL

Posted: Tue Mar 02, 2010 6:33 pm
by massung
It's important to note that %0D (the number 13) is the ASCII character for CR. Simply put: you have a newline at the end of your URL string and need to get rid of it. ;)

Jeff M.

Re: Characters after URL

Posted: Tue Mar 02, 2010 6:54 pm
by Andycal
Magic! I will now go and dig through the documentation and work out just how to do that...

Re: Characters after URL

Posted: Tue Mar 02, 2010 7:02 pm
by Andycal
OK.

It seems this should be easy. Assuming this character is a carriage return, I did this:

Code: Select all

replace CR with empty in tCurrDoc
But I get the same result. Should I be looking elsewhere for these characters? Is it not as simple as a 'CR'?

Re: Characters after URL

Posted: Tue Mar 02, 2010 7:10 pm
by FourthWorld
The RevTalk constant "CR" maps to ASCII 10, the linefeed character on Unix which is used for all internal line breaks in the RevTalk engine.

To clear Mac CR's (ASCII 13) from text use:

replace numtochar(13) with empty in tCurrDoc