Oracle Character Set Summary (encountered an example: The query result column is titled Chinese characters, but displayed as '? ')

Source: Internet
Author: User

Problem Handling methods:

Query: Select Userenv (' language ') from dual;

Compare the value of the computer environment variable Nls_lang with the query result, if not, modify the computer environment variable Nls_lang

After solving the problem, we summarize the session characters by querying the data:

The character set can be divided into three categories:

1, database server character set;

SELECT * from Nls_database_parameters

The nls_database_parameters is derived from props$ and is the character set that represents the database.

2. Client Character Set Environment

SELECT * from V$nls_parameters;

SELECT USERENV (' language ') from DUAL;

USERENV, V$nls_parameters represents the current character set environment. If you are executing on the client, the client character set environment is represented.

It originates from V$parameter, which represents the setting of the client's character set, which may be a parameter file, an environment variable, or a registry

3. Session Character Set Environment

SELECT * from Nls_session_parameters;

Can be set nls_language= ' Simplified Chinese ' by alter session;

It originates from V$nls_parameters, which represents the session's own settings, either the environment variables of the session or the ALTER session, if there is no special setting for the session, the

Consistent with V$nls_parameters.

The client's character set requires consistency with the server to correctly display non-ASCII characters for the database. If multiple settings exist, ALTER session> environment variable > registry > Parameter File

Character set requirements are consistent, but language settings can be different, language settings are recommended in English. If the character set is ZHS16GBK, then Nls_lang can be AMERICAN_AMERICA.ZHS16GBK.

Oracle Character Set Summary (encountered an example: The query result column is titled Chinese characters, but displayed as '? ')

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.