Unicode anyone ?...

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Unicode anyone ?...

Post by Dixie » Mon Sep 23, 2013 9:14 am

I have for example 'cafés' coming out of a mySQL database, but when it is put into an LC Field it is all messed up... 'cafEs' (with the accent on top of the 'E' pointing in the wrong direction...

Code: Select all

      put item theItem of thisLine into theIndexName
      set the unicodeText of fld 1 of group count of group "setGroup" to uniEncode(theIndexName,"UTF-8")
anyone tell me what I'm doing wrong ?

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Unicode anyone ?...

Post by Dixie » Mon Sep 23, 2013 11:35 am

This problem has been solved with the help of Tim Selander

Issue this command at the top of every script that retrieves data from mySQL

Code: Select all

revExecuteSQL theDatabaseID, "SET NAMES 'utf8'"

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Unicode anyone ?...

Post by Klaus » Mon Sep 23, 2013 1:09 pm

Hi Dixie,

being a UNICODE newbie, too, what does that command do exactly: -> revExecuteSQL theDatabaseID, "SET NAMES 'utf8'"?
Resp. what is the resut of that command? Does it affect the encoding when I retrieve data after issuing that command?
Sorry, clueless :D


Best

Klaus

Post Reply