Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The problem of garbled codes in sqlplus

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, I encountered the problem of Chinese garbled code during the sqlplus test. When it comes to garbled code, the first thing that comes to mind is the problem of inconsistent character set.

Problem description: login error due to password input error, but the display result is garbled.

two。 After viewing the relevant information on the Internet, you need to set up NLS_LANG to make it consistent with the character set on the oracle server side.

[oracle@mycentos ~] $echo $NLS_LANG

AMERICAN_AMERICA.ZHS16GBK

SQL > col parameter for A30

SQL > col value for A30

SQL > select * from nls_database_parameters where parameter in ('NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET')

PARAMETER VALUE

NLS_LANGUAGE AMERICAN

NLS_TERRITORY AMERICA

NLS_CHARACTERSET AL32UTF8

The value of stitching NLS_LANGUAGE, NLS_TERRITORY and NLS_CHARACTERSET is the value of NLS_LANG to be set, that is,

NLS_LANG=AMERICAN_AMERICA.AL32UTF8

NLS_LANG does not match the target value, so you need to re-output the value of NLS_LANG, that is

[oracle@mycentos ~] $export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Re-enter the above error reporting operation to display the Chinese error message normally.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report