Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

oralce字符集 oralce oralce教程 oralce字符集 字符集设置

$
0
0
oralce字符集

问题如下:

1、有个人的名字是王?,但是oralce11.2.0.4.0存成了‘王?’。

2、oralce字符集ZHS16GBK,通过oralce的local builder查看,这个字符集中没有这个“?”字

3、新建了一个数据库,字符集改完AL32UTF8,

create table t(N varchar2(200));

select t.*, t.rowid from T t;

insert into t values('?');

此时依然乱码,

insert into t values(unistr(REPLACE('\u3b4e','\u','\')));此时不乱了。

unistr

UNISTR takes as its argument a text literal or an expression that resolves to character

data and returns it in the national character set. The national character set of the

database can be either AL16UTF16 or UTF8. UNISTR provides support for Unicode

string literals by letting you specify the Unicode encoding value of characters in the

string. This is useful, for example, for inserting data into NCHAR columns.

字符集无论怎么设置,不用unistr都乱码,很奇怪。


Viewing all articles
Browse latest Browse all 6262

Trending Articles