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 -> R: SQL*Net : LF -> CR+LF conversion

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

From: Cristian Veronesi <c.veronesi_at_crpa.it>
Date: Thu, 04 Jun 1998 11:45:21 +0200
Message-ID: <35766CB1.236A77A0@crpa.it>


Thomas Kyte [SMTP:tkyte_at_us.oracle.com] 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.

Sorry, I omitted some important details about the circumstances in which I experienced this problem.
The problem occours with Oracle Webserver 1.0. I have an Oracle 7.2 database on a Unix system and Oracle Webserver on a NT system connected to the Oracle database via SQL*Net. I configured the Oracle Web Agent in order to access stored procedures stored in the Oracle Database. If in my stored procedure I put the following command:

htp.print('How' || chr(10) || 'Now' || chr(10) || 'Brown' || chr(10) || 'cow');

the user's browser receive the following string :

How<CR><LF>Now<CR><LF>Brown<CR><LF>cow (21 bytes)

I think the problem is somewat related to SQL*Net because I installed Oracle Webserver on the Unix system too and if I try to access the same stored procedure connecting with a browser to the Unix system I get exactly the same bytes that I would expect to receive, i.e.:

How<LF>Now<LF>Brown<LF>cow (17 bytes)

Best Regards,
Cristian Veronesi
c.veronesi_at_crpa.it Received on Thu Jun 04 1998 - 04:45:21 CDT

Original text of this message

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