Insert Unicode Using cx-Oracle and Setting NLS_LANG for Oracle

set enviroment in python or bash

1
2
os.environ[“NLS_LANG”] = “TRADITIONAL CHINESE_HONG KONG.AL32UTF8” or
export NLS_LANG=“TRADITIONAL CHINESE_HONG KONG.AL32UTF8”

get lang in Oracle

1
2
3
SELECT USERENV ('language') FROM DUAL;
select * from v$nls_parameters WHERE parameter IN ( 'NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');
SELECT * from NLS_DATABASE_PARAMETERS WHERE parameter IN ( 'NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');

others

1
2
3
select * FROM V$NLS_VALID_VALUES;
select * from NLS_SESSION_PARAMETERS;
select * from database_properties;