My Oracle Support Banner

UTL_FILE.PUT Adds 0D 0A when Writing EOF (chr(26)) on Windows. (Doc ID 1322965.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 11.1.0.7 to 11.2.0.2.0 - Release: 11.1 to
Information in this document applies to any platform.

Symptoms

UTL_FILE.PUT always adds 0D 0A when writing EOF (chr(26)) on Windows.

Please see the following sample:

CREATE OR REPLACE DIRECTORY PUBTEST as 'C:\...\...';
GRANT read, write ON DIRECTORY PUBTEST to public;

create or replace PROCEDURE TEST3 AS
h_File UTL_FILE.FILE_TYPE;
--
BEGIN
h_file := UTL_FILE.FOPEN ('PUBTEST','EOF.txt','w');
UTL_FILE.PUT (h_file, 'T'||chr(26));
UTL_FILE.CLOSE (h_file);
END TEST3;
/
show errors;

exec test3;

--Result:
-----------
--54 1A 0D 0A



Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
  Symptoms
  Cause
  Solution
  References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.