Skip to content

Using National Character Sets

Using National Character Sets#

When using NCHAR and NVARCHAR type character constants, if the following environment variables settings are made, there will be no concerns over possible data loss.

  1. The ALTIBASE_NLS_NCHAR_LITERAL_REPLACE environment variable must be set to1.

    $ export ALTIBASE_NLS_NCHAR_LITERAL_REPLACE =1
    
  2. In order to use NCHAR type data that are encoded differently from the database character set, enter the character "N" in front of the string.

    iSQL> create table t1 (c1 nvarchar(10));
    Create success.
    iSQL> insert into t1 values (N'AB가나');
    1 row inserted.
    iSQL> select * from t1;
    C1
    ------------------------
    AB가나
    1 row selected.