Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: UTL_FILE Extra FormFeed in Windows??
I though MS used the New Line character also known as the Line Feed,
chr(10), and a Carriage Return, chr(13) to terminate a text file line while
UNIX uses just the NL. Regardless of the exact character code value, if
your file is going to be used in a MS environment it is correct. If you are
going to use it in a UNIX environment then if you use an ASCII mode FTP to
transfer the file the FTP software should automatically strip the extra
character out just as it should add it in when transferring from a UNIX
platform to a MS platform.
There are utilities available that add/strip the proper characters into/from text files for use between the two systems. You can probably find some of them via a google search.
HTH -- Mark D Powell --
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of
k.sriramkumar_at_iflexsolutions.com
Sent: Thursday, May 27, 2004 10:00 AM
To: oracle-l_at_freelists.org
Subject: UTL_FILE Extra FormFeed in Windows??
Importance: High
Hi Gurus,
I have the following code, when I run this code in a DB on unix, it runs perfectly but when I run this code in DB on windows, it adds a additional form feed character(chr(12)) at the end.
CREATE OR REPLACE PROCEDURE edi_tst IS
out_file UTL_FILE.file_type;
out_line VARCHAR2 (200);
begin
out_file := UTL_FILE.fopen ('c:\', 'tst.txt', 'w',32000); UTL_FILE.put (out_file, 'TEST'); utl_file.new_line(out_file, 1); UTL_FILE.put(out_file, 'TEST Line 2'); UTL_FILE.put(out_file, 'TEST'); UTL_FILE.fclose(out_file);
Output of Octal Dump for a file created in Windows
/tmp> od -bc tst.txt
0000000 T E S T \n T E S T L i n e 2 124 105 123 124 012 124 105 123 124 040 114 151 156 145 040 062 0000020 T E S T \n 124 105 123 124 012
Any clues how to avoid the extra form feed character??
Best Regards
Sriram Kumar
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlput 'unsubscribe' in the subject line.
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org
![]() |
![]() |