Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Net : LF -> CR+LF conversion

Re: SQL*Net : LF -> CR+LF conversion

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 03 Jun 1998 17:43:35 GMT
Message-ID: <35778aa2.9222060@192.86.155.100>


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  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US