In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
First of all, the reason for the formation of Chinese garbled code is due to the disunity of the character set, different character sets are bound to appear garbled in the process of conversion, of course, it can be converted. Therefore, in order to solve the problem of Chinese garbled code, the idea is to unify the character sets involved in the process of input, storage and display into one. The first prerequisite for oracle is to unify the character set of the server and the client segment. If the problem can not be solved, it is also necessary to unify the character set of the system, or even the character set used for importing or inputting data.
After reading some materials on the Internet, it is said that the risk of modifying the character set of the server is relatively high. Indeed, it is easy to say that if it is the server of the online project, the consequences of modifying the character set of the server are unbearable. Nonsense, I will post my solution below.
1. Garbled code problem
At the beginning, the table is created through the sql statement, and the data is inserted, and finally select is carried out. The following questions are always displayed in the command interface:
2. Query the character set of the server
SQL > select userenv ('language') from dual
The following results are displayed:
AMERICAN_AMERICA.WE8MSWIN1252
This character set is rather strange. I've never seen it before, but there are too many things I haven't seen before. since people design such a character set by default, it should have its advantages.
3. View the character set set by the client in the configuration file
Vi / home/oracle/.bash_profile
The display results are as follows:
Export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
It turns out that when I installed oracle, I set the character set of the client to AMERICAN_AMERICA.ZHS16GBK. If the character set of the server is different from that of the client, it is bound to make an error. Change the character set of the client to AMERICAN_AMERICA.WE8MSWIN1252, and re-execute the program. The delightful result appears:
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.