Turkish Characters causes problems...

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
erkanv
Posts: 6
Joined: Wed 09 Sep 2009 11:59

Turkish Characters causes problems...

Post by erkanv » Wed 09 Sep 2009 12:04

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 ?...

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 10 Sep 2009 10:41

Please specify whether you get this problem in Direct mode only or in both OCI and Direct modes.

erkanv
Posts: 6
Joined: Wed 09 Sep 2009 11:59

Turkish Characters problem is valid both Direct and OCI .

Post by erkanv » Thu 10 Sep 2009 11:35

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 15 Sep 2009 09:41

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.

erkanv
Posts: 6
Joined: Wed 09 Sep 2009 11:59

there is no charset such as WE8WIN1252 ..

Post by erkanv » Thu 17 Sep 2009 05:56

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 ?

erkanv
Posts: 6
Joined: Wed 09 Sep 2009 11:59

Post by erkanv » Thu 17 Sep 2009 05:57

to WE8WIN1252 ..

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 17 Sep 2009 07:02

Sorry, I mean WE8MSWIN1252

erkanv
Posts: 6
Joined: Wed 09 Sep 2009 11:59

This made even worse...

Post by erkanv » Thu 17 Sep 2009 12:11

ZED TANITIM ORG. LTD.¿T¿.

turkish characters are replaced with a reverse question mark ?

Any new idea?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 18 Sep 2009 08:14

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?

erkanv
Posts: 6
Joined: Wed 09 Sep 2009 11:59

with OCI and registry properly set I encounter Turkish prob.

Post by erkanv » Fri 18 Sep 2009 12:36

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 21 Sep 2009 09:25

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, ']^', 'İŞ')

Post Reply