Home » SQL & PL/SQL » SQL & PL/SQL » Character set problem -- related to OS...
Character set problem -- related to OS... [message #310842] Wed, 02 April 2008 10:28 Go to next message
jkmurthy
Messages: 22
Registered: May 2005
Location: India
Junior Member

Hi,

We have a DB server [ Oracle 9.2.0.8 ] which is running on HP-Unix box. We recently faced a problem where-in one of our Insert scripts worked from the Oracle clients which are installed on our desktops running Windows XP and failed when run from the Unix server box . This was due to some French characters which were present in the script.

One of the insert statements is pasted below for your reference:

UPDATE LABEL_VALUE SET VALUE = 'Privé' WHERE LABEL_ID = 189 AND COUNTRY_CD = 'FR';

And the error which we got on running this in HP-UX is

ORA-01756: quoted string not properly terminated

The above error did not appear on the Windows machine running Oracle client. We think it is something to do with the Operating system Regional setting. Could you please let us know if that is the case and how to rectify it?

In another case, the above query which ran on one system [ windows ] didn’t run on another [ windows ].

The DB Characterset is UTF8.
Re: Character set problem -- related to OS... [message #317464 is a reply to message #310842] Thu, 01 May 2008 08:53 Go to previous messageGo to next message
agujjari
Messages: 8
Registered: April 2008
Junior Member
UPDATE LABEL_VALUE SET VALUE = 'Privé' WHERE LABEL_ID = 189 AND COUNTRY_CD = 'FR';

try using

UPDATE LABEL_VALUE SET VALUE = 'Prive' WHERE LABEL_ID = 189 AND COUNTRY_CD = 'FR';
Re: Character set problem -- related to OS... [message #317473 is a reply to message #310842] Thu, 01 May 2008 09:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use bind variables and not litterals in your program, you will not have problem with values.

Regards
Michel
Re: Character set problem -- related to OS... [message #317818 is a reply to message #310842] Sat, 03 May 2008 22:00 Go to previous message
TheSingerman
Messages: 49
Registered: April 2008
Location: Brighton, Michigan
Member
Also, keep in mind that character set conversions in Oracle are done by the client and not by the database server. So, if your client is configured to use a different character set than the one your server is using, you will get some strange character set conversion issues. This is true even if everything else on the client uses the same character set as the server.

An example which might make this clearer: You are testing on a WinDoze box. It has been configured so that you can insert and select Euro symbols with no problems. You deploy your application on another WinDoze box. You insert a Euro symbol from your application. The Euro symbol gets converted to something else. Why? Because your web administrator did a default installation, and the Oracle client there is using US7ASCII, which has no Euro symbol.

If you have access to MetaLink, search there for "character set conversion"; there are a couple of articles there which actually do an excellent job of explaining this topic.
Previous Topic: Help in following Sql..
Next Topic: Null Value during the Execution of Query
Goto Forum:
  


Current Time: Mon Dec 05 19:27:44 CST 2016

Total time taken to generate the page: 0.05277 seconds