firebird乱码问题

http://www.firebird.net.cn/forum_view.asp?forum_id=5&view_id=165

http://www.firebird.net.cn/forum_view.asp?forum_id=1&view_id=1017

http://hi.baidu.com/xingfupingguo/blog/item/bc94c044ffa7c086b2b7dc85.html

/* Table: PERSON */

CREATE TABLE PERSON (
    PER_ID INTEGER NOT NULL,
    PER_FIRST_NAME VARCHAR (40) CHARACTER SET GB_2312 COLLATE GB_2312,
    PER_LAST_NAME VARCHAR (40) CHARACTER SET GB_2312 COLLATE GB_2312,
    PER_BIRTH_DATE DATE,
    PER_WEIGHT_KG FLOAT,
    PER_HEIGHT_M FLOAT);


 

关键在这里:
 CHARACTER SET GB_2312 COLLATE GB_2312,


在创建数据库时可以指定为GB2312,这样数据库的默认编码就是GB2312了,但有个前提,要求数据库已经安装的GB2312字符集,不然将无法创建.

 



posted @ 2008-06-28 04:10  shiningrise  阅读(967)  评论(0编辑  收藏  举报