XML+MySQL+UTF8 = MISERY

Tereza Snyder tereza at califex.com
Fri Sep 17 08:48:27 EDT 2010


On Sep 17, 2010, at 7:15 AM, Trevor DeVore wrote:

> On Sep 17, 2010, at 1:39 AM, Tereza Snyder wrote:
> 
>>  6b I upload the scored survey to a MySQL database on the remote server, first escaping it:
>> 	   put revXMLText( gTaxoDataA[gCurrentSlot][kID] ,,true) into tXML
>> 	   replace "\" with "\\" in tXML
>> 	   replace quote with "\" & quote in tXML
>> 	   replace "'" with "\'" in tXML
>> 	   replace tab with "\t" in tXML
>> 	   replace cr with "\n" in tXML
>> 	   put encodeUtf8( tXML ) into tData
> 
> What encoding does the column in your MySQL database use? I set the default encoding for the DB to UTF-8 and don't have any problems but I think you have to do that explicitly.
> 

I will try setting the encoding for the column. I did experiment with doing that earlier in the debugging process to no avail but I will throw that back into the mix!

thanks


t

-- 
Tereza Snyder
Califex Software, Inc.
<www.califexsoftware.com>







More information about the use-livecode mailing list