Prevent unicode in string input?
alexabelson
I have a function:
Function LoadFile(filePath)
where the filePath is a string which may contain something like:
.../031617
The problem is that the /031517 will get converted to something else because it is interpreted as a unicode character.
Is there any way to make this string interpreted "literally", for lack of a better term? I am already using
ParseFilePath
to convert from Windows to Macintosh syntax, but this issue occurs before that conversion.Thanks!
There is nothing in Igor that treats "/031617" as Unicode.
Igor does treat backslash followed by three digits as the octal code for a byte. If that is not what you want, use two backslashes. Execute this for details:
DisplayHelpTopic "Escape Sequences in Strings"
June 14, 2017 at 09:04 pm - Permalink
Sorry, I meant backslash. I will look into this topic. So it sounds like if the actual path name has a backslash followed by three digits I have to input it with two backslashes and there is no way to get around this.
I have another program which runs an Igor procedure via the command line and passes a filepath as an argument. It will be difficult to modify the output of the other program, which is why I want to do the interpretation in Igor.
Thanks.
June 15, 2017 at 12:11 am - Permalink