Home » SQL & PL/SQL » SQL & PL/SQL » Junk data Inserted for "ÿ" (Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production)
Junk data Inserted for "ÿ" [message #564902] Wed, 29 August 2012 07:10 Go to next message
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 #564916 is a reply to message #564915] Wed, 29 August 2012 08:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
I tried with Sql*Plus.Facing the same issue.

Do not say, show us.
And show us in a formatted way, so read the link I provided.

Something wrong with this US7ASCII.
Repost the same query with a "SELECT *" instead.

Regards
Michel
Re: Junk data Inserted for "ÿ" [message #564917 is a reply to message #564916] Wed, 29 August 2012 09:50 Go to previous messageGo to next message
mnitu
Messages: 159
Registered: February 2008
Location: Reims
Senior Member
I think that US7ASCII use 7 bit's only and it cannot represent Chr(255)
Re: Junk data Inserted for "ÿ" [message #564919 is a reply to message #564917] Wed, 29 August 2012 10:00 Go to previous message
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
Previous Topic: Clob
Next Topic: database trigger problem using exec_sql package
Goto Forum:
  


Current Time: Tue Apr 21 17:19:37 CDT 2026