JSON; Text Encoding; WideString; "Nathan\u2019s"; OSProcess

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

JSON; Text Encoding; WideString; "Nathan\u2019s"; OSProcess

Sorry for the strange title, but my problem touches on all of the topics.

While trying to execute an #OSProcess method "ExternalWindowsOSProcess command:", the image crashes. 

I think I have identified the source of the problem as encoded data which I have acquired from the web.  My application seems to be reliable except in the circumstance when there is \u data in the string which is presented as the Question Mark character #?. The data is in JSON syntax. The raw data string is "Nathan\u2019s". It is converted to  "Nathan?s" somewhere, but I have not found the method where it happens.

Simple test case: 
This command fails and the image crashes when the value of ? = 8217.
ExternalWindowsOSProcess command: 'cmd.exe /c ', 'echo Nathan?s' 

The command executes when the ASCI single quote #' is used.
ExternalWindowsOSProcess command: 'cmd.exe /c ', 'echo Nathan's' 

How can I convert the value of an element of a WideString from 8217 to something less than 255?
Or do you have a better idea?



Beginners mailing list
[hidden email]