National Language Support

Overview of National Language Support

National Language Support (NLS) is a set of features that enable a software product to function properly in every global market for which the product is targeted. The SAS System contains NLS features to ensure that SAS applications can be written so that they conform to local language conventions. Typically, software that is written in the English language works well for users who use the English language and use data that is formatted using the conventions that are observed in the United States. However, without NLS, these products might not work well for users in other regions of the world. NLS in SAS enables users in regions such as Asia and Europe to process data successfully in their native languages and environments.
For information and detailed syntax for all SAS language elements that contain NLS properties, see SAS National Language Support (NLS): Reference Guide.

SPD Server NLS Support

SPD Server supports a subset of the SAS System NLS functionality. The server supports encoding and locale.
  • An encoding maps each character in a character set to a unique numeric representation, which results in a table of all code points. This table is referred to as a code page, which is an ordered set of characters in which a numeric index (code point value) is associated with each character. The position of a character on the code page determines its two-digit hexadecimal number.
  • A locale reflects the language, local conventions such as data formatting, and culture for a geographical region. Local conventions might include specific formatting rules for dates, times, and numbers and a currency symbol for the country or region. Collating sequence, paper size, postal addresses, and telephone numbers can also be included in locale.
All tables that are produced by the server and SAS inherit the SAS session's default encoding and locale settings. By default, the server code expects new tables to follow the current SAS session's encoding and locale. Table updates that append rows or update existing rows will perform transcoding to ensure that appended and updated table rows match the existing table encoding.
Wire transfer is in the character set encoding of the SAS session for transfers to and from the server host, unless server transcoding has been disabled.

SPD Server NLS Limitations

Affected Data

The server hosts are restricted in how they handle NLS character strings. Server hosts are restricted to data that is contained in character columns in tables and some metadata structures. Server hosts store table and column labels using the NLS encoding that they were created in. If a SAS session that uses a different NLS encoding requests server table data, the label names are not transcoded for printing or logging.
Column names, index names, table names, and catalog names are not supported in the server NLS. Column names, index names, table names, and catalog names are still dependent on ASCII support. The server SQL is subject to the same NLS restrictions.

SQL Explicit Pass-Through

SPD Server SQL explicit pass-through does not support NLS. SQL explicit pass-through operates in the encoding and locale of the SAS session that initiates the CONNECT statement to the SASSPDS engine.

Case Folding and Sort Sequences

SPD Server NLS code supports limited English Latin1 and Polish Latin2 case folding for SBCS encodings. UTF8 case folding is limited to the ASCII range of UTF8 encoding. NLS sort sequences are restricted to lexical sorts for all combinations. The server does not support linguistic sorting.

Indexes and Ordering

Indexes in SPD Server are created in the table's encoding and only support lexical ordering. If the client's encoding and locale settings match the server host table's encoding and locale settings, index use is unrestricted. Otherwise, index use is restricted to certain predicates in WHERE clauses that can be safely interpreted according to the table's encoding and locale settings. When the client and host table encoding and locale settings differ, the EVAL2 strategy is used to filter predicates that require use of order.

Date and Time Representations

SPD Server functions and formats that produce or accept textual date, time, and date/time representations are not locale-sensitive.

INENCODING= and OUTENCODING= Options

The INENCODING= and OUTENCODING= LIBNAME statement options override and change the encoding when reading or writing data. These options are not supported and produce a Warning message if submitted for the SASSPDS engine.

ENCODING= Option

The ENCODING= data set option, which overrides and transcodes the encoding of external files, is supported for output processing only. Character data is assumed to be in the encoding of the session that initiates the CONNECT to SASSPDS engine. If you specify ENCODING= for a table that is not an output table and the specified value does not match the table's encoding, the server produces a Warning message. The message states that the ENCODING= option is ignored and that the encoding values do not match.

TRUNCWARN= LIBNAME Statement Option

The TRUNCWARN= LIBNAME statement option for the SASSPDS engine suppresses hard failure on transcoding overflow and character mapping errors. The default setting is NO, which causes hard Read and Write stops when transcoding overflow or mapping errors are encountered. When you use TRUNCWARN=YES, data integrity can be compromised, because significant characters can be lost. When TRUNCWARN=YES is specified and an overflow or character mapping error occurs, a Warning message is displayed in the SAS log when the table is closed if overflow occurs, but the data overflow is lost.
Last updated: February 8, 2017