LogicalDOC在上传中文名文件,新建中文文件夹,新建用户包含有中文,导入文件夹路径含有中文……出现各种报错。
需要修改对应的MySQL的数据库字符设置,添加如下即可解决:
#mysql -u root -plogicaldoc logicaldoc
>ALTER TABLE ld_document MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_version MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder MODIFY ld_name varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_note MODIFY ld_message varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_note MODIFY ld_snippet varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_comment varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_path varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_pathold varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_filenameold varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_comment varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_path varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_pathold varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_filenameold varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user_history MODIFY ld_comment varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user_history MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_workflowhistory MODIFY ld_comment varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_workflowhistory MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_workflowhistory MODIFY ld_taskname varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_document MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_version MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder MODIFY ld_name varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_note MODIFY ld_message varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_note MODIFY ld_snippet varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_comment varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_path varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_pathold varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_history MODIFY ld_filenameold varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_comment varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_path varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_pathold varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_folder_history MODIFY ld_filenameold varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user_history MODIFY ld_comment varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user_history MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_workflowhistory MODIFY ld_comment varchar(4000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_workflowhistory MODIFY ld_filename varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_workflowhistory MODIFY ld_taskname varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_username varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_password varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_name varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_firstname varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_street varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_email varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_emailsignature varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_email2 varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_user MODIFY ld_emailsignature2 varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_version MODIFY ld_foldername varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>ALTER TABLE ld_importfolder MODIFY ld_path varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin;
原文地址:http://blog.51cto.com/418324/2119339
时间: 2024-11-05 18:52:03