Oracle view character set, and handling of garbled characters in Chinese

Source: Internet
Author: User

Col VALUE format A20

Select Parameter,value from nls_database_parameters where PARAMETER like '%characterset% ';


PARAMETER VALUE--------------------------------------------------nls_characterset Al32utf8nls_nchar_cha Racterset AL16UTF16



Select Userenv (' language ') from dual;

USERENV (' LANGUAGE ')----------------------------------------------------American_america. Al32utf8



Lang is a set of languages, regions, and character sets for Linux systems, which are valid for applications under Linux, such as date;

Nls_lang is a setting for Oracle language, region, and character set that works with tools in Oracle


Export Nls_lang=american_america. Zhs16gbk

Export Nls_lang=american_america. UTF8

Export Nls_lang=simplified Chinese_america. UTF8


Lang=en_us. UTF-8


Export lang= zh_cn. GB2312

Export lang= en_US. UTF-8



Locale View Character Set

Locale-a viewing the local character set

Locale-m View all supported character sets


Alter session Set Nls_date_format = ' Yyyy-mm-dd HH24:mi:ss ';


Select To_char (sysdate, ' Yyyy-mm-dd HH24:mi:ss ') from dual;

Select To_date (' 2005-01-01 13:14:20 ', ' yyyy-mm-dd HH24:mi:ss ') from dual;



The way to ensure that Chinese does not garbled:

1, remote Tools, such as the Crt,xshell character set to support the Chinese character set such as Utf-8

2, operating system environment variable settings support Chinese character set, such as Utf-8 LANG or Nls_lang

3. Database supports Chinese character set Utf-8




Oracle view character set, and handling of garbled characters in Chinese

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.