如何判断我的 Oracle 系统是否设置为支持 Unicode 或多字节字符?
我知道 Oracle 支持多个字符集,但是如何确定我工作的当前 11g 系统是否启用了该功能?
I understand that Oracle supports multiple character sets, but how can determine if the current 11g system where I work has that functionality enabled?
推荐答案
SELECT *
FROM v$nls_parameters
WHERE parameter LIKE '%CHARACTERSET';
将显示数据库和国家字符集.数据库字符集控制CHAR
和VARCHAR2
列中数据的编码.如果数据库在这些列中支持 Unicode,则数据库字符集应为 AL32UTF8(或在极少数情况下为 UTF8).国家字符集控制 NCHAR
和 NVARCHAR2
列中数据的编码.如果数据库字符集不支持 Unicode,您可以将 Unicode 数据存储在具有这些数据类型的列中,但这通常会增加系统的复杂性 - 应用程序可能必须更改以支持国家字符集.
will show you the database and national character set. The database character set controls the encoding of data in CHAR
and VARCHAR2
columns. If the database supports Unicode in those columns, the database character set should be AL32UTF8 (or UTF8 in some rare cases). The national character set controls the encoding of data in NCHAR
and NVARCHAR2
columns. If the database character set does not support Unicode, you may be able to store Unicode data in columns with these data types but that generally adds complexity to the system-- applications may have to change to support the national character set.
相关文章