sourceEncoding parameter

Use the sourceEncoding parameter to set or query the character encoding of the file on its originating platform.

 

Availability

query command
set command
current parameter
default parameter
install parameter

 

Scope

sourceEncoding is scoped to the current document.
current.sourceEncoding is scoped to the current document.
default.sourceEncoding is globally scoped.
install.sourceEncoding is globally scoped.

 

Syntax

query sourceEncoding
set sourceEncoding { default
                   | [ encoding | native ]
                   }
query current.sourceEncoding
query default.sourceEncoding
set default.sourceEncoding { install
                           | [ encoding | native ]
                           }
query install.sourceEncoding 

 

Parameters

default If you specify the default parameter for the set sourceEncoding command, the current document will use the value of default.sourceEncoding as its source character encoding.
encoding If you specify the encoding parameter for the set sourceEncoding command, the source character encoding indicated by encoding will be used for the current document.  If you specify the encoding parameter for the set default.sourceEncoding command, the character encoding indicated by encoding will be used for all documents that have the sourceEncoding parameter set to default.
native Specifying the native parameter is equivalent to specifying the encoding parameter with the value of the default character encoding on the native platform.
install If you specify the install parameter for the set default.sourceEncoding command, all the documents that have sourceEncoding set to default will use the value of install.sourceEncoding as the source character encoding.

 

Description

By default, the source encoding of the document is the character encoding of its underlying file.  This is normally the default character encoding of the platform on which the editor is running (native encoding).  When the file on the native platform is the local copy of a file on a remote system (such as zSeries), specifying the original remote-system character encoding of the file allows the editor to consider and emulate various characteristics of the original file, such as displaying the Shift-in and Shift-out control characters of an EBCDIC DBCS file, and calculating the correct record length on saves.

The query current.sourceEncoding command returns the source character encoding used for the current document.

 

Examples

query sourceEncoding
set sourceEncoding Cp930
query current.sourceEncoding
query default.sourceEncoding
query install.sourceEncoding 

Related reference
query command
set command
current parameter
default parameter
install parameter
shiftInCharacter parameter
shiftOutCharacter parameter
showSosi parameter
sourceCcsid parameter
useSourceColumns parameter