Home » Infrastructure » Windows » Problem in saving Unicode characters. (Oracle 9i, Windows.)
Problem in saving Unicode characters. [message #349713] Mon, 22 September 2008 17:22 Go to next message
rareddy
Messages: 2
Registered: September 2008
Location: c
Junior Member

I am trying to save unicode charaters to a table with nvarchar column.
When I insert em-dash (—) I see a —

eg:I I insert
he café with your résumé.ĺńö Unless — you are naďve, - meet me at the café with your résumé.

Output on PL/SQL developer is: (Note the — )
============================
he café with your résumé.ĺńö Unless — you are naďve, — meet me at the café with your résumé.


When i fetch it in java application I see — being stored as . This makes my XML parsers to fail.


DB setting
=============
CharacterSet=AL16UTF16

select * from v$nls_parameters
=======
1 NLS_LANGUAGE AMERICAN
2 NLS_TERRITORY AMERICA
3 NLS_CURRENCY $
4 NLS_ISO_CURRENCY AMERICA
5 NLS_NUMERIC_CHARACTERS .,
6 NLS_CALENDAR GREGORIAN
7 NLS_DATE_FORMAT DD-MON-YY
8 NLS_DATE_LANGUAGE AMERICAN
9 NLS_CHARACTERSET WE8ISO8859P1
10 NLS_SORT BINARY
11 NLS_TIME_FORMAT HH.MI.SSXFF AM
12 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
13 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
14 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
15 NLS_DUAL_CURRENCY $
16 NLS_NCHAR_CHARACTERSET AL16UTF16
17 NLS_COMP BINARY
18 NLS_LENGTH_SEMANTICS BYTE
19 NLS_NCHAR_CONV_EXCP FALSE
Re: Problem in saving Unicode characters. [message #349750 is a reply to message #349713] Tue, 23 September 2008 00:37 Go to previous messageGo to next message
Michel Cadot
Messages: 58489
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to check:
- your client NLS_LANG
- your client program is able to display this character (spool th result in a file and open it with wordpad to see what you get).

For your next post, please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel

[Updated on: Tue, 23 September 2008 00:39]

Report message to a moderator

Re: Problem in saving Unicode characters. [message #349915 is a reply to message #349750] Tue, 23 September 2008 08:28 Go to previous messageGo to next message
rareddy
Messages: 2
Registered: September 2008
Location: c
Junior Member

Hi Michel,
Thanks for the update.
I see that in my client the NLS_LANG is set to
[AMERICAN_AMERICA.WE8ISO8859P1]

As suggested I spooled the results and viewed the results through editplus and it looks good. So its something to do with .NET/JAVA driver that our other team is using which is converting this charater em-dash (—) to  when it is read.

If any one as any clue on this let me know.

Michel thanks again atleast I know now data is stored correctly.


Re: Problem in saving Unicode characters. [message #349919 is a reply to message #349915] Tue, 23 September 2008 08:32 Go to previous message
Michel Cadot
Messages: 58489
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So as this is not a SQL problem and seems to be a .NET one I move this topic to Windows forum.

Regards
Michel
Previous Topic: TNSLSTNR.EXE crashes with every connection
Next Topic: Oracle reports running slow when an XP machine is out of reach
Goto Forum:
  


Current Time: Tue Jul 22 23:23:57 CDT 2014

Total time taken to generate the page: 0.09196 seconds