How can i save in UTF-8 format?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
SEAL29
Posts: 63
Joined: Fri Oct 02, 2020 3:32 pm

How can i save in UTF-8 format?

Post 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")
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

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

Post by dunbarx »

Hi.

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

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

Craig
andresdt
Posts: 156
Joined: Fri Aug 16, 2019 7:51 pm
Contact:

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

Post 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")
Be kind, we all have our own wars.
https://torocruzand.com/
SEAL29
Posts: 63
Joined: Fri Oct 02, 2020 3:32 pm

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

Post 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
Post Reply