Print Thread
Chr(13) in clob mistery ..
#59106 12/03/18 09:13 AM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
Hi
I am using PL/SQL developer 8.0.4
I have this strange problem: a pl sql procedure has a clob OUT parameter.
Data are written in this parameter in a text delimited format.
The plsql code adds only a LF (chr(10)).
When I look at the output in a test window, though, I see a CR LF couple.
If I run the very same test script via sqlplus I see only LF.
So I guess: is PL/SQL developer adding a CR in some way ?
thanks
Bye
Nicola

Re: Chr(13) in clob mistery ..
nicofari #59107 12/03/18 10:03 AM
Joined: Aug 1999
Posts: 22,232
Member
Offline
Member
Joined: Aug 1999
Posts: 22,232
Multi-line character strings will indeed have a cr/lf pair as an end-of-line marker on the Windows client. On the server there will only be a CR character as end-of-line marker.


Marco Kalter
Allround Automations
Re: Chr(13) in clob mistery ..
Marco Kalter #59108 12/03/18 10:07 AM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
Hi
thanks for replying
But who is responsible for adding the missing CR character ?
It must be the plsql dev code, because from sqlplus I don't see it.
I ask because I have a java client which uses ojdbc driver and it shows the LF terminator only.
So I started investigating this discrepancy

Last edited by nicofari; 12/03/18 10:07 AM.
Re: Chr(13) in clob mistery ..
nicofari #59109 12/03/18 11:12 AM
Joined: Aug 1999
Posts: 22,232
Member
Offline
Member
Joined: Aug 1999
Posts: 22,232
This is indeed PL/SQL Developer behavior. You can go to Preferences > SQL Window and disable the "Read LF as CR/LF from database" option to control this behavior.


Marco Kalter
Allround Automations
Re: Chr(13) in clob mistery ..
Marco Kalter #59111 12/03/18 11:24 AM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
Hi Marco
Perhaps was that option added in later version ?
I have the 8.0.4.1514 version and that flag does not show up.
Perhaps in this version that behaviour was hardcoded ?

Re: Chr(13) in clob mistery ..
nicofari #59114 12/03/18 12:28 PM
Joined: Aug 1999
Posts: 22,232
Member
Offline
Member
Joined: Aug 1999
Posts: 22,232
Yes, that is indeed correct.


Marco Kalter
Allround Automations
Re: Chr(13) in clob mistery ..
Marco Kalter #59115 12/03/18 12:57 PM
Joined: Apr 2003
Posts: 84
Parma, Italy
N
Member
OP Offline
Member
N
Joined: Apr 2003
Posts: 84
Parma, Italy
Ok everything is clear now.
Thank you so much
Have a nice day
Nicola


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.030s Queries: 14 (0.006s) Memory: 2.5234 MB (Peak: 3.0423 MB) Data Comp: Off Server Time: 2024-06-14 19:10:41 UTC
Valid HTML 5 and Valid CSS