Hi Panos.

This does not work, and it is somewhat similar to what I tried initially, 
although I am certain I should use textDecode when importing text to LiveCode, 
as per the Dictionary. Also note that tFile only holds the url to the file 
containing the JSON, and your suggestion only encodes the file path. The 
strange thing is that the text I try to import was encoded as “UTF-8” when it 
was initially exported from LiveCode. It shows up all right in all other 
applications that can read .txt files.

When I do only a single run of text decoding, no array is created. When I do a 
double decoding, the array is created, but the chars in question does not show 
up in the keys of the array. Another thing that puzzles me is that som values, 
like -0.2 or -0.4 will show up with som additional zeros in the JSON-text. When 
I add a space between the minus operator and the number, it is displayed 
correctly.

I am still at odd with what may be the cause of this.

Regards Tore  

> 6. jun. 2018 kl. 13:40 skrev panagiotis merakos via use-livecode 
> <[email protected]>:
> 
> on preOpenStack
>  put empty into kommuneArray
>  put "file:" & specialFolderPath("resources")& "/Kommunedata.txt" into
> tFile
>  put textEncode(tFile,"UTF-8") into tData
>  put jsonToArray(tData) into kommuneArray
> end preOpenStack
> 
> Best,
> Panos
> --

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to