Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the difference between LANG and NLS_LANG in linux

Shulou Source: shulou.com Published: 2022-06-01 18:02:58 10月26日 Update

Today, I will talk to you about the difference between LANG and NLS_LANG in linux. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

The code is as follows:

Export LANG=zh_CN.GB2312

Export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

$export LANG=zh_CN.GB2312

$date

Tuesday, November 27th, 2012, 16:20:35 CST

The display is a Chinese interface.

The code is as follows:

$export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

$sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0-Production on Tue Nov 27 16:19:03 2012

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

And Real Application Testing options

SQL > select sysdate from dual

SYSDATE

-

27-NOV-12

The English environment is shown, but it only works for ORACLE programs.

The LANG settings for environment variables in the Linux system mainly include the following items:

The code is as follows:

[root@blliu tmp] # locale

LANG=zh_CN.gb2312

LC_CTYPE= "zh_CN.gb2312"

LC_NUMERIC= "zh_CN.gb2312"

LC_TIME= "zh_CN.gb2312"

LC_COLLATE= "zh_CN.gb2312"

LC_MONETARY= "zh_CN.gb2312"

LC_MESSAGES= "zh_CN.gb2312"

LC_PAPER= "zh_CN.gb2312"

LC_NAME= "zh_CN.gb2312"

LC_ADDRESS= "zh_CN.gb2312"

LC_TELEPHONE= "zh_CN.gb2312"

LC_MEASUREMENT= "zh_CN.gb2312"

LC_IDENTIFICATION= "zh_CN.gb2312"

LC_ALL=

Here LC_ALL is not set, if it is set, all the above settings are invalid, the system will read LC_ALL.

Locale-a view local character set

Locale-m view all supported character sets

Check the NLS_LANG settings in the Oracle database:

The code is as follows:

SQL > SELECT *

2 FROM DATABASE_PROPERTIES

3 WHERE PROPERTY_NAME IN

4 ('NLS_LANGUAGE',' NLS_TERRITORY', 'NLS_CHARACTERSET')

PROPERTY_NAME PROPERTY_VALUE DESCRIPTION

-

NLS_LANGUAGE AMERICAN Language

NLS_TERRITORY AMERICA Territory

After reading the above, do you have any further understanding of the difference between LANG and NLS_LANG in linux? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Code content characters character sets environment systems support variables data databases weeks more interfaces knowledge programs articles industries information channels projects Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux Microsoft Apple MariaDB