Pulling Unicode Data from a DataGrid

Trevor DeVore lists at mangomultimedia.com
Tue Mar 19 08:14:50 EDT 2013


On Mon, Mar 18, 2013 at 5:04 PM, James Little <littlejamesw at mac.com> wrote:

> We're translating our app SmoothieRx into Japanese and have been
> struggling to get UTF-16 text from a DataGrid. We've tried all sorts of
> combinations of uniEncode, uniDecode on the data and it all comes out
> garbled. We first overrode the DataGrid, so we can see that the Japanese in
> the datagrid is correct. But, when we pull it out using GetDataOfLine or
> dgDataOfLine and then try to decode it, it is garbled. Current thinking is
> that we need to create another handler like GetUnicodeDataOfLine. Any ideas?
>

Todd,

GetDataOfLine and dgDataOfLine return the exact data you stored in the data
grid so you shouldn't need any additional handlers.

A couple of questions:

1) Are you populating the data grid with an array containing UTF-16 data?

2) When you display the Japanese text in the data grid are you setting the
unicodeText of a field in the row?

3) Is the user updating this Japanese text at all or is it read-only?

4) What conversions are you trying to run on the data when you pull it out
with GetDataOfLine?

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

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



More information about the use-livecode mailing list