Page 1 of 1

Turkish Characters causes problems...

Posted: Wed 09 Sep 2009 12:04
by erkanv
I develop a program that connect to Oracle10G R2 database with the following NLS features.,
This the returning statement of “select * from nls_session_parameters” from this database.

NLS_LANGUAGE TURKISH
NLS_TERRITORY TURKEY
NLS_CURRENCY TL
NLS_ISO_CURRENCY TURKEY
NLS_NUMERIC_CHARACTERS ,.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD/MM/RRRR
NLS_DATE_LANGUAGE TURKISH
NLS_SORT TURKISH
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD/MM/RRRR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RRRR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY YTL
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

I need to show data via a grid in my program but turkish problems causes problem. Instead of ş Ğ Ç Ö , I receive characters: ?[]

I use ODAC Pro. net version.
How can I remove this problem.
Would you guide me ?...

Posted: Thu 10 Sep 2009 10:41
by Plash
Please specify whether you get this problem in Direct mode only or in both OCI and Direct modes.

Turkish Characters problem is valid both Direct and OCI .

Posted: Thu 10 Sep 2009 11:35
by erkanv
the problem is valid both for direct and OCI version with a little difference. When used with OCI :
OCI: Version 8.1.7.0.0
DLL: C:\oracle\ora81\BIN\oci.dll
Home [OraHome81]: C:\oracle\ora81
Default Home [OraHome81]: C:\oracle\ora81
Current Home: C:\oracle\ora81
Call style: v8
Oracle: Oracle Database 10g Enterprise Edition 10.2.0.2.0

every Turkish Character is replaced with a different character for example İ with and Ş with ^. With direct mode every Turkish character is replaced with a "?" (question mark).
within the options of Session Component I have set the charset to WE8ISO8859P9 which is Turkish but no help. Still the problem persists.

Would you help me ? It is so crucial for me to exhibit the data in Turkish.
I had used a previous version of ODAC and there was no such error without doing anything. it was Oracle Data Access Components 3.00. ! approx. 7 years ago . when I use this components again there is no problem also. this is strange to me !

Kind Regards.
Erkan VAROL

Posted: Tue 15 Sep 2009 09:41
by Plash
Value that you have assigned to the Charset property is incorrect. You should assign a value that corresponds your client character set.

Please tell us what results you will receive if you set Charset to WE8WIN1252 or to the empty string.

there is no charset such as WE8WIN1252 ..

Posted: Thu 17 Sep 2009 05:56
by erkanv
When I set the charset option of TSession I receive
"Unknown charset" error and it can not connect.

What else can I do to remove the Turkish Character Problem ?

Posted: Thu 17 Sep 2009 05:57
by erkanv
to WE8WIN1252 ..

Posted: Thu 17 Sep 2009 07:02
by Plash
Sorry, I mean WE8MSWIN1252

This made even worse...

Posted: Thu 17 Sep 2009 12:11
by erkanv
ZED TANITIM ORG. LTD.¿T¿.

turkish characters are replaced with a reverse question mark ?

Any new idea?

Posted: Fri 18 Sep 2009 08:14
by Plash
At first we need to make your program work in the OCI mode. Please tell us whether you see the same reverse question marks in the OCI mode with Charset = WE8MSWIN1252.

Check your registry settings. Open the HKEY_LOCAL_MACHINE\Software\Oracle\HOME0 key. Make sure that the NLS_LANG value contains WE8MSWIN1252 character set (for example, AMERICAN_AMERICA.WE8MSWIN1252).

Then run the SQL*Plus application and select data from your table. Can you see the correct data in SQL*Plus?

with OCI and registry properly set I encounter Turkish prob.

Posted: Fri 18 Sep 2009 12:36
by erkanv
I have done every step you had proposed.
But again no help.
Still I receive the following output both from SQL*Plus and ORAQuery designer with OCI enabled.

DOKU M]MARLIK LTD.^T]. ->>>>> ] is İ and ^ is Ş.

You should offer me another way ... I am sure there must be a way to remedy the problem . Even with ODAC 3 I was able to get the Turkish characters correctly .

Will version 6.9 be good for the problem ?
I have used OCI 8.1.7 to connect to Oracle 10R2. Is it ok ?

Kind Regards.
Erkan VAROL - Programmer.

Posted: Mon 21 Sep 2009 09:25
by Plash
Probably your data was written to the database in an incorrect encoding. Maybe this has happened because you wrote your data using ODAC 3 and Direct mode.

Try to insert a new record with Turkish characters to the database (using OCI mode). Then reopen the query. You should see that Turkish characters are correct in this record.

You should correct your old data by replacing characters. For example:

UPDATE Table1 SET Field1 = TRANSLATE(Field1, ']^', 'İŞ')