| Junk data Inserted for "ÿ" [message #564902] |
Wed, 29 August 2012 07:10  |
gp185007
Messages: 45 Registered: April 2005 Location: Mumbai
|
Member |
|
|
Hi,
We need to maintain the day 0 value of special character "ÿÿ" for application.
If i use the special character directly in sql file , it is getting inserted as junk character "?"
If i use workaround by using chr(255) function i am getting below behaviour.
select chr(255) from dual
---------------------------
ÿ
However below query gives null value.
select chr(255)||chr(255) from dual
---------------------------
Request your help on this issue.
Thanks.
Regards,
Ganesh
|
|
|
|
| Re: Junk data Inserted for "ÿ" [message #564905 is a reply to message #564902] |
Wed, 29 August 2012 07:20   |
 |
Michel Cadot
Messages: 68776 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
SQL> select chr(255) from dual
2 /
C
-
ÿ
1 row selected.
SQL> select chr(255)||chr(255) from dual
2 /
CH
--
ÿÿ
1 row selected.
It works for me.
1/ Try it with SQL*Plus
2/ What is your NLS_LANG setting?
3/ Post the result of:
select distinct CLIENT_CHARSET from V$SESSION_CONNECT_INFO where CLIENT_CHARSET is not null
select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
Also please How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Regards
Michel
[Updated on: Wed, 29 August 2012 07:21] Report message to a moderator
|
|
|
|
| Re: Junk data Inserted for "ÿ" [message #564915 is a reply to message #564905] |
Wed, 29 August 2012 08:37   |
gp185007
Messages: 45 Registered: April 2005 Location: Mumbai
|
Member |
|
|
I tried with Sql*Plus.Facing the same issue.
Please find the output of the above queries.
SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET
';
VALUE
--------------------------------------------------------------------------------
AL32UTF8
SQL> select distinct CLIENT_CHARSET from V$SESSION_CONNECT_INFO where CLIENT_CHA
RSET is not null;
CLIENT_CHARSET
----------------------------------------
WE8MSWIN1252
Unknown
US7ASCII
|
|
|
|
|
|
|
|
| Re: Junk data Inserted for "ÿ" [message #564919 is a reply to message #564917] |
Wed, 29 August 2012 10:00  |
 |
Michel Cadot
Messages: 68776 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
It depends on which line of the view the value applies, this is why I asked for the result of the complete view.
And of course US7ASCII does not understand chr(255) but Oracle converts it and this does answer the question, why one chr(255) works and not 2. I have some ideas about this but I need more information before giving useless opinion.
Regards
Michel
|
|
|
|