Importing Unicode from MySQL
Bob Sneidar
bobsneidar at iotecdigital.com
Wed Jul 26 16:16:32 EDT 2017
Trevor, does sqlYoga do this automatically? Is there a down side to doing this by default?
Bob S
> On Jul 26, 2017, at 08:47 , Devin Asay via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Andy,
>
> Thanks for that tip. It’s one I never have heard about. I’ll try this next time I need to read UTF8 from my db.
>
> Devin
>
>
> On Jul 26, 2017, at 1:03 AM, AndyP via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
>
> I had the same problems a while ago, but got it sorted with the following.
>
> *Before* you do any interactions with the db, add this line.
>
> *revExecuteSQL MyConnectionID, "SET NAMES 'utf8'"*
>
> "SET NAMES 'utf8'" is needed whenever you want to send/retrieve data
> to/from the server having characters that cannot be represented in pure
> ASCII, like 'ñ' or 'ö'.
>
> Then retrieve the data
>
> *put textDecode("SELECT * FROM MyTable","UTF-8") into fld "MyField"*
More information about the use-livecode
mailing list