| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Net : LF -> CR+LF conversion
A copy of this was sent to Cristian Veronesi <c.veronesi_at_crpa.it>
(if that email address didn't require changing)
On Wed, 03 Jun 1998 16:44:25 +0200, you wrote:
>Greetings.
>I noticed that SQL*Net automatically translates LF characters into CR+LF
>sequences when a Windows client connects to a Unix database server. For
>particular reasons, I DON'T WANT SQL*Net TO DO SO. Do you have any tips?
>
>Thanks in advance - Best Regards,
>Cristian Veronesi
>c.veronesi_at_crpa.it
Umm, no it doesn't. For example:
SQL> create table testing_crlf( x varchar2(25) );
Table created.
SQL> isnert into testing_crlf values (
unknown command beginning "isnert int..." - rest of line ignored.
SQL> insert into testing_crlf values (
2 'How
3 Now
4 Brown
5 cow' );
1 row created.
SQL> insert into testing_crlf values
2 ( 'How ' || chr(13)||chr(10) || 'Now ' || chr(13)||chr(10) );
1 row created.
SQL> select x, dump( x ) from testing_crlf;
How
Now
Brown
cow
Typ=1 Len=17: 72,111,119,10,78,111,119,10,66,114,111,119,110,10,99,111,119
How
Now
Typ=1 Len=12: 72,111,119,32,13,10,78,111,119,32,13,10
So, the how now brown cow with LF between the lines got inserted with LF's only (72,111,119,10,78 = How<LF>N).
to get a CR/LF, I had to explicitly put it in. Perhaps the program that is putting the data in is turning LF into CR/LF pairs? You might be reading a TEXT file with fgets or some other f*() function and the file was opened with a mode of "rt" (read text)?
This was done from an NT client to a solaris server.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Jun 03 1998 - 12:43:35 CDT
![]() |
![]() |