On our Oracle database server 10GR2 we have the NLS_CHARACTERSET set to WE8ISO8859P15.
Our windows XP pro clients use the CodePage ACP 1232 (windows codepage for the West Europe).
When I write a character ("€") into the database, the ascii code is the one of the client (1232, wich is hex80) instead of the WE8ISO8859P15 code as it should be.
How can I make the conversion happen between the Client and the DB, when I use the DIRECT mode?
Without the DIRECT mode (going throught the oranet) it works fine.
I use this version of ODAC: Oracle Data Access Componants Professional Edition, version 6.25.2.15 for Delphi 2005 on Windows XP Pro SP2 MUI.
I tried to set the torasession.options.characterset but it doesn't seems to help.
thanks
mitch
Oracle Characterset
-
michellenweiter
- Posts: 29
- Joined: Thu 09 Jun 2005 06:23
- Location: Bern, Switzerland
-
michellenweiter
- Posts: 29
- Joined: Thu 09 Jun 2005 06:23
- Location: Bern, Switzerland
That's what I thought, but it doesn't solve the problem. The help says:
"
Charset Sets character set that ODAC uses to read and write character data.
Supported with Oracle 8 client only.
"
... and I do have an Oracle Client 9i and 10G, but because of the DIRECT property set to true, I should not use the Oracle Client and the Oranet.
Any other suggestion would be really appreciate.
"
Charset Sets character set that ODAC uses to read and write character data.
Supported with Oracle 8 client only.
"
... and I do have an Oracle Client 9i and 10G, but because of the DIRECT property set to true, I should not use the Oracle Client and the Oranet.
Any other suggestion would be really appreciate.
-
michellenweiter
- Posts: 29
- Joined: Thu 09 Jun 2005 06:23
- Location: Bern, Switzerland
oups, I re-checked it to be sure and you are right, it solve the problem 
with this characterset set in the application, it convert the code to the one used by the database.
Thanks a lot for your help.
It would be a good idea the set this property dynamically in the software, depending on the Windows codepage.
Any suggestion how whe could find the Windows CodePage (read from the registry or API, I guess) and the matching Oracle characterset?
Otherwise, it means that application would only work specifically for Windows configured with this Code Page.
I thought it could happen automatically, if the charset is not set, but it is not the case.
with this characterset set in the application, it convert the code to the one used by the database.
Thanks a lot for your help.
It would be a good idea the set this property dynamically in the software, depending on the Windows codepage.
Any suggestion how whe could find the Windows CodePage (read from the registry or API, I guess) and the matching Oracle characterset?
Otherwise, it means that application would only work specifically for Windows configured with this Code Page.
I thought it could happen automatically, if the charset is not set, but it is not the case.
We are planning to add the feature of automatically detecting client character set in one of the next ODAC builds.
Currently you can use GetCP Windows API function to get code page number. You can also write a simple mapping procedure that supports several code pages that can be used on computers where your program will run.
Currently you can use GetCP Windows API function to get code page number. You can also write a simple mapping procedure that supports several code pages that can be used on computers where your program will run.