[Newbies] JSON; Text Encoding; WideString; "Nathan\u2019s"; OSProcess

John-Reed Maffeo jrmaffeo at gmail.com
Sun Aug 11 22:24:15 UTC 2019

*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?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20190811/d1f7c552/attachment.html>

More information about the Beginners mailing list