I have been trying for a week and just can't get it to work, unicode encoding and decoding etc.
I guess that this is a problem for many.
OK, the details:
In a field called "S4 Text" (it is text in S4 phonetics), I have the following text with weird but wanted characters:
ðə top twe‛ntii pəse‛nt
hæv oo‛lweiz bii‛n pritii we‛l edʒəkeitid
I want insert this into my database with something like this:
Code: Select all
on mouseUp
   global gConnectionID
   if gConnectionID is not a number then
      answer error "Please connect to the database first."
      exit to top
   end if
   --put unidecode(the unicodeText of field "S4 Text" ,"UTF8") into theS4Text
   get the unicodeText of fld "S4 Text"
   put uniDecode(it,"utf8") into theS4Text
   put "Update main set S4_Spelling = '" &theS4Text& "';" into tSQL
   put tSQL
   revExecuteSQL gConnectionID, tSQL
   put the result
end mouseUpI can take the text from field "S4 Text" field as unicode, convert it back and put it in another field (called "Data") with the following routine:
Code: Select all
on mouseUp
   put uniEncode(the unicodeText of field "S4 Text","UTF16") into theUnicode8text
   set the unicodeText of field "Data" to uniDecode(theUnicode8text,"English")
end mouseUpThe boldness of the characters is lost, but this does not matter.ðə top twe‛ntii pəse‛nt
hæv oo‛lweiz bii‛n pritii we‛l edʒəkeitid
Why can't a MySQL database perform the same role as a variable, transparently?
I really need to get this sorted out, all suggestions gratefully received.

