LogicalDOC含有中文字符的各种报错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LogicalDOC含有中文字符的各种报错相关的知识,希望对你有一定的参考价值。

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;

以上是关于LogicalDOC含有中文字符的各种报错的主要内容,如果未能解决你的问题,请参考以下文章

LogicalDOC8.0导入远程文件数量限制

dom4j解析标签名中含有特殊字符报错

thinkPHP使用函数时字符串中不能含有管道符”|“,否则报错;

各种报错

错误记录Flutter 混合开发获取 BinaryMessenger 报错 ( FlutterActivityAndFragmentDelegate.getFlutterEngine() )(代码片段

Powershell 批量重命名文件中含有 [] 导致报错