日期:2014-05-16 浏览次数:20523 次
导入如下SQL语句时,数据库中显示乱码。
insert into CONFERENCE(CONFERENCEID,SUBCONFERENCEID,ACCESSNUMBER,ACCOUNTID,ALLOCATEDID,ALLOWVIDEOCONTROL,SCREENTYPE,SCREENSWITCHMODE,BOARDNUM,CANRECORD,CHARGEMODE,CONFERENCEMODE,CONFERENCESTATE,CONFERENCETYPE,CYCLETYPE,ENDTIME,ENTERPROMPT,FACTENDTIME,LANGUAGE,LEAVEPROMPT,LENGTH,LOCKSTATE,MEDIATYPES,MEMBERNOTIFY,MEMO,NEEDADDMEMOTOSMS,NEEDAUTOINVITE,NEEDAUTOKINESCOPE,NEEDAUTORECORD,NEEDINVITEPWD,NEEDPARTICIPATORLIMIT,ORGANIZATIONID,PERMITINVITE,PERMITKINESCOPE,PERMITRECORD,REALORGANIZATIONID,REASON,RECORDFILEPATH,RESERVESIZE,SCHEDULENOTIFY,SCHEDUSERMOBILE,SCHEDUSERNAME,CONFERENCESIZE,SPEAKSTATE,STARTTIME,SUBJECT,SUMMERTIME,TIMEZONE,UPDATENOTIFY,VOICERECORDSTATE,VOICETOPICPATH,VOICETOPICSTATE,EXT1,EXT2,EXT3) values('0000152972',2,'25001','1',16,0,'','','1270015060',0,'scheduler','COMMON','Schedule','schedule','cycle',1238251500000,'',1238251500000,'zh_cn','',840,'','video',1,'',0,0,0,0,0,0,'topOrganization',1,1,1,'topOrganization',0,'20090328/meet0000152972',3,1,'','',3,1,1238201100000,'周期视频会议',0,56,1,'UnRecord','0000152972','UnRecord',null,null,null);
插入的SQL语句中的字段包含中文,由于数据库字符集与操作系统字符集设置不同,导致数据库显示乱码。
% sqlplus / as sysdba
SQL> select value from nls_database_parameters where parameter='NLS_LANGUAGE';
显示参数值为“AMERICAN”。
VALUE
--------------------------------------------------------------------------------
AMERICAN
SQL> select value from nls_database_parameters where parameter='NLS_TERRITORY';
显示参数值为“AMERICA”。
VALUE
--------------------------------------------------------------------------------
AMERICA
SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
显示参数值为“WE8MSWIN1252”。
VALUE
--------------------------------------------------------------------------------
WE8MSWIN1252
SQL>