Solved the conversion problem in the Oracle database in different character sets

zhaozj2021-02-16  80

Understand Oracle's multi-language settings, Oracle multi-language settings are to support world-wide language and character sets, generally for language tips, monetary forms, sorting methods, and CHAR, VARCHAR2, CLOB, and long fields of data. Oracle's multi-language settings is the main two feature of national language settings and character set settings. The national language setting determines the language type of interface or prompt, and the character set determines the database save and character set. (Such as text) encoding rules. As a small example of the above, the environment variable NLS_LANG is different, which leads to the Help Help, which is the role of multi-language settings (NLS_LANG contains national language settings and character set settings, and the role is a national language setting, not characters. set). Oracle character set setting, divided into database character sets and client character set environment settings. In the database end, the character set is set when the database is created, and saved in the database PROPS Table, for 8i products, you can use the "ALTER DATABASE Character Set" to modify the character set of the database, but it is only From subset to supercharge, do not modify the character set through the Update Props $, if it is not supported, you may lose all the data related to the character set, which is the supported conversion, or the database is not working properly. The character set is divided into single-byte character set and multi-byte character set, US7ASCII is a typical single-byte character set, in this character set Length = Lengthb, and zHS16GBK is a common double-word character set, here Lengthb = 2 * Length. The character set environment in the client is relatively simple, mainly environment variables or registration items NLS_LANG, note NLS_LANG's priority to: Parameter file à REPUS à Environment Variable àalter session. The group of NLS_LANG is "national language settings. Character set", such as NLS_LANG = Simplified Chinese_China.zHS16GBK. The client's character set is preferably the same as the database end (country language settings can be different, such as the zhs16GBK character set, the client can be NLS_LANG = Simplified Chinese_China.zhs16GBK or AMEIRCAN_AMERICA.ZHS16GBK, do not affect the normal display of the database character), if The character set is different, and the conversion of the character set is not compatible, then the client's data display and the data related to the export / imported and the character set will be garbled. With a little bit of skill, you can convert data on the database of different character sets. Here you need a 2 credit editing tool, such as uedit32.

转载请注明原文地址:https://www.9cbs.com/read-12653.html

New Post(0)