On 14/03/2017 21:26, J. Landman Gay via use-livecode wrote:
I'm dealing with non-English languages, and JSON data retrieved from a
database comes in with unicode escape sequences like this: Eduardo

I need to translate those. I can do it by replacing the "\u" with "0x"
and then using numToCodepoint() to get the UTF16 character. But there
could be many of these in the same string, so I'm looking for a one-shot
command that might just do them all. I don't think we have one.

The alternative is to loop through all the text, getting an offset for
each "\u" and then calculating the number of characters after that to
use with numToCodepoint(). But will it always be 4 characters in any

Or is there an easier way?

JsonImport() should handle those automatically. Please let me know if it doesn't!


Dr Peter Brett <peter.br...@livecode.com>

lcb-mode for Emacs: https://github.com/peter-b/lcb-mode

use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription 

Reply via email to