Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with ODBC (Oracle) and "german umlaute"

3,275 views
Skip to first unread message

Frank Leverenz

unread,
Aug 10, 2012, 8:11:16 AM8/10/12
to
Hi,

I'm accessing Oracle via ODBC using SQLtable class.

Problem:
I can't read "german umlaute" like "Ä" {ä}, they are automatically convertet to i.e. "A".
But I can write them to the table.

So if I put "Äquator" in a string field, it will be stored correct in the oracle table, but on the screen (after the update) appears "Aquator".

It did not depend on SetAnsi(TRUE) or SetAnsi(FALSE), this happens in both cases.

Any idea?

Ciao
Frank

Thomas Olszewicki

unread,
Aug 10, 2012, 10:55:14 AM8/10/12
to
Can you read it using SQLPlus?
Thomas

Frank Leverenz

unread,
Aug 13, 2012, 8:35:05 AM8/13/12
to
Yes, with iSQL*Plus all characters are OK

Thomas Olszewicki

unread,
Aug 13, 2012, 9:30:44 AM8/13/12
to
> Yes, with iSQL*Plus all characters are OK- Hide quoted text -
>
> - Show quoted text -

Frank,
iSQL*Plus uses IE browser to set chars.
Can you try with SqlPlus: the command line version:
From Windows cmd box:
Type: sqlplus /nolog
and then
conn <user>/<pwd>@<tnsalias>
and
your select statement.

AFAIK VO ODBC SQL classes don't convert characters.
(at least the version I know... very old one.)

ODBC uses Oracle OCI dll (Oracle native connection).
Character Conversion depends on 2 things:
1. Oracle server character set :
SELECT * FROM NLS_DATABASE_PARAMETERS
look for NLS_CHARACTERSET.
Example: AL32UTF8

2. Oracle client setting on the connecting machine:
In registry go to: HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE >
Key..home..
Look at entry called NLS_LANG, second part indicates a character set.
Example: AMERICAN_AMERICA.AL32UTF8
It character set is not the same it does conversion.

HTH
Thomas

Frank Leverenz

unread,
Aug 13, 2012, 11:18:17 AM8/13/12
to
Hi Thomas,

thanks for your answer:

1.) the database settings are:
NLS_CHARACTERSET WE8ISO8859P1
NLS_NCHAR_CHARACTERSET AL16UTF16

2.) you're right: if I test it with the command line version, it's wrong too:
i.e. "Schwõbische" instead of "Schwäbische"

3.) the registry key is:
NLS_LANG = GERMAN_GERMANY.WE8MSWIN1252


What is the best solution?
- changing registry setting to AMERICAN_AMERICA.AL32UTF8
- changing registry setting to AMERICAN_AMERICA.AL16UTF16
- changing database settings (to what?)
- changing TNSNAMES.ORA

Ciao
Frank

Thomas Olszewicki

unread,
Aug 13, 2012, 2:31:46 PM8/13/12
to
On Aug 13, 11:18 am, Frank Leverenz <frank.lever...@micodat.com>
wrote:
The only option is to change settings in registry:
change it to GERMANY_GERMAN.WE8ISO8859P1
to mach the settings on the database.
HTH
Thomas

Frank Leverenz

unread,
Aug 14, 2012, 7:54:25 AM8/14/12
to
Thanks, Thomas, it works :)

Frank Leverenz

unread,
Aug 15, 2012, 10:09:43 AM8/15/12
to
If anyone got the same problem:

after setting NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1 in the registry (the same value as the Oracle database has), it works with sqlplus.exe and other window ODBC programs like Excel2010, but not with vo apps.

Then I set the system environment variable NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1 and it works with the vo apps too

Thomas Olszewicki

unread,
Aug 15, 2012, 10:19:37 AM8/15/12
to
Frank,
Do you have more than one instance of OCI.DLL or more than one Oracle
client on the client machine?
What ODBC are you using (Oracle or MS)?
T.
0 new messages