Page 1 of 1

How can i save in UTF-8 format?

Posted: Sat May 15, 2021 7:41 pm
by SEAL29
How can i export/import text from/in Data Grid in UTF-8 format?
I use this in Data Grid

Code: Select all

put the dgtext of grp "filmDataGrid" of cd "listcard" into tVariable
put tVariable into url("file:/Volumes/Data/Adatlapok/filmDataGrid.txt")
This command works with field

Code: Select all

set the unicodeText of fld "tartalom" to uniEncode(tTartalom, "UTF8")

Re: How can i save in UTF-8 format?

Posted: Sat May 15, 2021 10:57 pm
by dunbarx
Hi.

I don't use unicode, but know that "unicodeText" is deprecated.

Might the "put unicode" command do what you want?

Craig

Re: How can i save in UTF-8 format?

Posted: Sun May 16, 2021 2:32 pm
by andresdt
Hi, try using textDecode or textEncode

Code: Select all

put the dgtext of grp "filmDataGrid" of cd "listcard" into tVariable
put textDecode( tVariable, "UTF-8") into url("file:/Volumes/Data/Adatlapok/filmDataGrid.txt")

Re: How can i save in UTF-8 format?

Posted: Sun May 16, 2021 7:07 pm
by SEAL29
andresdt wrote:
Sun May 16, 2021 2:32 pm
Hi, try using textDecode or textEncode

Code: Select all

put the dgtext of grp "filmDataGrid" of cd "listcard" into tVariable
put textDecode( tVariable, "UTF-8") into url("file:/Volumes/Data/Adatlapok/filmDataGrid.txt")
Thanks. The textEncode command works fine. :D