Pulling Unicode Data from a DataGrid

Trevor DeVore lists at mangomultimedia.com
Tue Mar 19 14:30:04 EDT 2013


On Tue, Mar 19, 2013 at 1:21 PM, James Little <littlejamesw at mac.com> wrote:

> 1) Are you populating the data grid with an array containing UTF-16 data?
> UTF 8, I overrode the default behavior and when I FillInData: I do this:
>          set the unicodetext of the long ID of me to uniencode(pData,
> "utf8")
> and this works great. But, when I tried converting to UTF-16, then it is
> garbled.
>
>          set the unicodetext of the long ID of me to uniencode(pData,
> "utf16")
>

uniencode always converts to UTF-16. unidecode always converts from UTF-16.
The second parameter specifies the encoding the text is currently in. So
the above shouldn't work as your text is not in UTF16 format.


> 4) What conversions are you trying to run on the data when you pull it out
> with GetDataOfLine?
>    put uniDecode(uniEncode(tVar, "UTF16")) into tVar
> We basically want to compare UTF-16 strings.


Your data is encoded as UTF-8 so you have to encode to get to UTF-16.

put uniencode(tVar, "utf8") into theUTF16Text

-- 
Trevor DeVore
Blue Mango Learning Systems
www.clarify-it.com    -    www.screensteps.com



More information about the use-livecode mailing list