Character Encoding
Character encoding systems consist of a code that pairs each character from a character set with something else, such as a sequence of numbers or octets, to facilitate data transmission and storage. LightDB-A Database supports a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as EUC (Extended UNIX Code), UTF-8, and Mule internal code. The server-side character set is defined during database initialization, UTF-8 is the default and can be changed. Clients can use all supported character sets transparently, but a few are not supported for use within the server as a server-side encoding. When loading or inserting data into LightDB-A Database, LightDB-A transparently converts the data from the specified client encoding into the server encoding. When sending data back to the client, LightDB-A converts the data from the server character encoding into the specified client encoding.
Data files must be in a character encoding recognized by LightDB-A Database. See the LightDB-A Database Reference Guide for the supported character sets.Data files that contain invalid or unsupported encoding sequences encounter errors when loading into LightDB-A Database.
Note On data files generated on a Microsoft Windows operating system, run the
dos2unixsystem command to remove any Windows-only characters before loading into LightDB-A Database.Note If you change the
ENCODINGvalue in an existinggploadcontrol file, you must manually drop any external tables that were creating using the previousENCODINGconfiguration.gploaddoes not drop and recreate external tables to use the newENCODINGifREUSE_TABLESis set totrue.
Parent topic: Formatting Data Files
Changing the Client-Side Character Encoding
The client-side character encoding can be changed for a session by setting the server configuration parameter client_encoding
SET client_encoding TO 'latin1';
Change the client-side character encoding back to the default value:
RESET client_encoding;
Show the current client-side character encoding setting:
SHOW client_encoding;