SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 63200: Importing a CSV file with UTF-16LE encoding and TERMSTR=CRLF can result in data loss

DetailsHotfixAboutRate It

In certain, rare cases, data loss can occur after you attempt to convert a CSV file with UTF-16LE encoding into a SAS data set. This issue is observed when either you use the Import Wizard in SAS® Foundation or you submit a DATA step with an INFILE statement that contains a TERMSTR=CRLF argument. 

The issue can occur because the 0x000d 0x000a record-terminator sequence in the CSV file is seen as part of the record. If that happens, there is a problem reading the rest of the file. 

If you encounter this issue, there are two workarounds:

  1. Use the Import Wizard in SAS® Enterprise Guide® to read the CSV file. It does not rely on the same underlying I/O routine that causes this issue.
  2. If the CSV file is a Microsoft Excel file, resave the file with UTF-8 encoding. The problem is limited to cases in which the length of the record-terminator sequence is greater than one byte. With UTF‑8 encoding, both the carriage return (CR) and line feed (LF) values require only a single byte to encode.

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemN/Az/OS9.4 TS1M3
z/OS 64-bit9.4 TS1M3
Android Operating System9.4 TS1M3
Apple Mobile Operating System9.4 TS1M3
Macintosh9.4 TS1M3
Microsoft Windows 109.4 TS1M3
Microsoft Windows 8 Enterprise 32-bit9.4 TS1M3
Microsoft Windows 8 Enterprise x649.4 TS1M3
Microsoft Windows 8 Pro 32-bit9.4 TS1M3
Microsoft Windows 8 Pro x649.4 TS1M3
Microsoft Windows Server 2008 R29.4 TS1M3
Microsoft Windows Server 2012 R2 Datacenter9.4 TS1M3
Microsoft Windows Server 2012 R2 Std9.4 TS1M3
Microsoft® Windows® for 64-Bit Itanium-based Systems9.4 TS1M3
Microsoft® Windows® for x649.4 TS1M3
Microsoft Windows 8.1 Enterprise 32-bit9.4 TS1M3
Microsoft Windows 8.1 Enterprise x649.4 TS1M3
Microsoft Windows 8.1 Pro 32-bit9.4 TS1M3
Microsoft Windows 8.1 Pro x649.4 TS1M3
Microsoft Windows Server 20089.4 TS1M3
Microsoft Windows Server 2008 for x649.4 TS1M3
Microsoft Windows Server 2012 Datacenter9.4 TS1M3
Microsoft Windows Server 2012 Std9.4 TS1M3
Windows 7 Enterprise 32 bit9.4 TS1M3
Windows 7 Enterprise x649.4 TS1M3
Windows 7 Home Premium 32 bit9.4 TS1M3
Windows 7 Home Premium x649.4 TS1M3
Windows 7 Professional 32 bit9.4 TS1M3
Windows 7 Professional x649.4 TS1M3
Windows 7 Ultimate 32 bit9.4 TS1M3
Windows 7 Ultimate x649.4 TS1M3
64-bit Enabled AIX9.4 TS1M3
64-bit Enabled HP-UX9.4 TS1M3
64-bit Enabled Solaris9.4 TS1M3
HP-UX9.4 TS1M3
HP-UX IPF9.4 TS1M3
Linux9.4 TS1M3
Linux for x649.4 TS1M3
Solaris for x649.4 TS1M3
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.