Thank you all very much for setting me straight.

This is Oracle and there seem to be 3 env vars that effect all of this ( Both Oracle & GTK ):
LANG
NLS_LANG
NLS_NCHAR

I can get the data to display correctly ( or just display even if incorrectly ) by setting the above.
Still working out how they interact.
Will post what I find or don't find.

Again, thanks !




On 8/5/2010 5:48 AM, Mattia Barbon wrote:
perltk wrote:UTF-

  Hi,

Then I read the file and put in textctrl&  listbox and it looked good.
Also print to STDOUT correctly - AND I did NOT have to use
the 'perl -C' or :utf8 encoding for things to work.

So I guess it is the strings that are being bad.

BUT how come the bad data show correctly on the command line if I use 'perl -C'?
And show correctly in Tk ?

Different defaults? It all depends on the charset/encoding of the data (ISO-8859-1, UTF-8, EUC-JP, ...), how Tk handles strings, possibly the locale.

I cannot modify the data - not my data.  What can I do to correct
or atleast get something other than a blank string ?

  Maybe you just need a call to Encode::decode($db_encoding, $db_data)?
Even easier, follow Johan Vromans' advice of having the database return the data in the correct encoding?

HTH,
Mattia



Reply via email to