SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Processing External Data → ABAP File Interface → Statements for the ABAP File Interface → OPEN DATASET → OPEN DATASET - mode →
OPEN DATASET - encoding
Syntax
... ENCODING { DEFAULT
| {UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]}
| NON-UNICODE } ... .
Alternatives:
1. ... DEFAULT
2. ... UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]
3. ... NON-UNICODE
Effect
The additions after ENCODING define the character representation in which the content of a text file is handled. The addition ENCODING must be specified in
Unicode programs and may only be omitted in
non-Unicode programs.
If the addition ENCODING is not specified in non-Unicode programs, the addition NON-UNICODE is used implicitly.
Programming Guideline
Write text files in UTF-8 and with a byte order mark.
Note
We recommend always writing files in UTF-8, if all readers can process this format. Otherwise, the code page can depend on the
text environment and it is difficult to identify the code page from the file content.
... DEFAULT
Effect
In a Unicode system, specifying DEFAULT is the same as specifying UTF-8; in a non-Unicode system, it is the same as NON-UNICODE.
... UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]
Addition:
... SKIPPING|WITH BYTE-ORDER MARK
Effect
The characters in the file are handled in accordance with the Unicode character representation UTF-8.
Notes
... SKIPPING|WITH BYTE-ORDER MARK
Effect
This addition defines how the byte order mark (BOM), with which a file encoded in the UTF-8 format can begin, is handled. The BOM is a sequence of three bytes that indicates that a file is encoded in UTF-8.
The addition BYTE-ORDER MARK cannot be used together with the AT POSITION addition.
Notes
... NON-UNICODE
Effect
In a non-Unicode system, the data is read or written without being converted. In a Unicode system, the
characters of the file are handled in accordance with the non-Unicode code page that would be assigned
at read or write time in a non-Unicode system, in accordance with the entry in the database table TCP0C of the current
text environment.