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: 61
Joined: Fri Oct 02, 2020 3:32 pm

How can i save in UTF-8 format?

Post by SEAL29 » Sat May 15, 2021 7:41 pm

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: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Sat May 15, 2021 10:57 pm

Hi.

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

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

Craig

andresdt
Posts: 146
Joined: Fri Aug 16, 2019 7:51 pm

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

Post by andresdt » 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")

SEAL29
Posts: 61
Joined: Fri Oct 02, 2020 3:32 pm

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

Post by SEAL29 » Sun May 16, 2021 7:07 pm

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

Return to “Getting Started with LiveCode - Complete Beginners”