Character Encoding
Posted: Fri May 16, 2025 9:29 am
So: I have 2 sample text files: one in Windows-1251 (Windows encoding for Cyrillic), and one in UTF8 . . .
Obviously correctly renders the second file . . .
This:
Throws a bluey with the first file (unsurprisingly).
Does anyone know WHERE I can find a list of all the non-unicode character encodings that LiveCode can cope with?
Code: Select all
on mouseUp
answer file "A text file"
if it <> "" then
put it into theFilePath
put URL ("file:" & theFilePath) into MYCHEESE
put textDecode(MYCHEESE, "UTF-8") into fld "f1"
end if
put the encoding of fld "f1" into fld "f2"
end mouseUp
This:
Code: Select all
on mouseUp
answer file "A text file"
if it <> "" then
put it into theFilePath
put URL ("file:" & theFilePath) into MYCHEESE
put textDecode(MYCHEESE, "cp1251") into fld "f1"
end if
put the encoding of fld "f1" into fld "f2"
end mouseUp
Does anyone know WHERE I can find a list of all the non-unicode character encodings that LiveCode can cope with?