I need to convert a text string to UTF 8? (or something similar that can fix this problem)
The problem is that when I import a .csv file to liveCode, process it, and then saving it on my computer, I get a lot of junk characters in the output file.
The imported file consists of Swedish letters, ie "å,ä,ö" and these are distorted.
What I find about this subject seems to apply to text fields or data grids, and not to a string.
Anyone who knows?
/// Peter
How can I convert a text string to UTF 8?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
How can I convert a text string to UTF 8?
/*Whats all the fuss with c# ?*/
Re: How can I convert a text string to UTF 8?
Hi Peter,
this should do the trick:
Now save tClean_data to a file on your disk and it should look fine with all accents, umlauts etc.
Best
Klaus
this should do the trick:
Code: Select all
...
## Use BINFILE to be sure!
put url("binfile:" & "path/to_your/csv_file.csv") into tOldData
put textdecode(tOldData,"UTF-8") into tClean_data
...
Best
Klaus
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Re: How can I convert a text string to UTF 8?
Thx Claus,
Work like a charm..
///Peter
Work like a charm..
///Peter
/*Whats all the fuss with c# ?*/
Re: How can I convert a text string to UTF 8?
Coooooooooool!