Re: screwed non-us7ascii characters while selecting from a database link
Date: Fri, 11 Jan 2008 13:51:25 +0100
Message-ID: <4787664e$0$16036$5fc30a8@news.tiscali.it>
Frank van Bortel wrote:
> alter session set nls_lamg=AMERICAN_AMERICA.WE8ISO8859P1;
I don't think it's possibile to set NLS_LANG this way.
I set the corresponding environment variable in the Linux shell before to launch sqlplus:
$ export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 $ sqlplus un/pw
> By default, your db2 session expects AL32UTF8, not a single byte
> characterset. Are you sure you use a terminal, capable of
> displaying UTF8?
My terminal is iso-8859-1 but this is not the problem. If the characters were correct they were converted according to the NLS_LANG enviroment variable. Data inserted into db2 with exp/imp is correctly shown. The problem is that "select from table_at_db1_link" shows different, wrong, characters, where "select * from table", where table was populated via exp/imp, shows correct characters.
> What messages regarding character translations do you get from the
> import/export sessions? None? (That would explain)
Export session from db1 (NLS_LANG=WE8ISO8859P1):
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
Import session into db2 (NLS_LANG=WE8ISO8859P1):
import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion)
The characters were correctly converted, I can see their UTF8 equivalents in the web application.
I guess Geoff gave the correct explaination...
Thank you. Kind regards, C. Received on Fri Jan 11 2008 - 06:51:25 CST