Japanese (unicode?) text problem

Tore Nilsen tore.nilsen at me.com
Wed Sep 21 01:36:52 EDT 2016


Internally LiveCode uses UTF-16. You can try to decode your text from UTF-8 like this:


put url tUrl into tTextToDecode
put textDecode(tTextToDecode,”UTF-8") into field “indices"


regards
Tore




> 21. sep. 2016 kl. 06.30 skrev Nicolas Cueto <niconiko at gmail.com>:
> 
> ​With Notepad++​, created a new file, pasted English and Japanese text, set
> encoding to UTF-8,  then saved as .txt. (Confirmed the file by opening with
> Windows' "Notepad".)
> 
> Next, in LC8.1 ran this button script:
> 
> on mouseUp
>   put empty into field "indices"
>   set the itemdel to quote
>   put item 2 of the long name of this stack into tDataPath
>   set the itemdel to "/"
>   delete the last item of tDataPath
>   put "/Data/bilingual.txt" after tDataPath
>   put "file:" & tDataPath  into tURL
>   put url tURL into field "indices"
> end mouseUp
> 
> The text appears in the field, but with Japanese text garbled.
> 
> What am I doing wrong?
> 
> Thanks.
> 
> --
> Nicolas Cueto
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list