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;

原文地址:http://blog.51cto.com/418324/2119339

时间: 2024-11-05 18:52:03

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

判断 sql 中是否含有中文字符-----待验证

select ascii(字段)数字:48-57字母:65-123汉字:123+ select * from t1 where len(unicode(c1)) < 5; 判断c1第一个字符是否是中文,小于5,非中文 SQL判断某列中是否包含中文字符.英文字符.纯数字 一.包含中文字符 select * from 表名 where 列名 like '%[吖-座]%' 二.包含英文字符 select * from 表名 where 列名 like '%[a-z]%' 三.包含纯数字 select

判断一个字符串中是否含有中文字符:

python中的encode和decode: 首先,在Python中字符串的表示是 用unicode编码.所以在做编码转换时,通常要以unicode作为中间编码. decode的作用是将其他编码的字符串转换成unicode编码,比如 a.decode('utf-8'),表示将utf-8编码的字符串转换成unicode编码 encode的作用是将unicode编码的字符串转换成其他编码格式的字符串,比如b.encode('utf-8'),表示将unicode编码格式转换成utf-8编码格式的字符串

kettle界面语言修改成中文后,重启报错

今天在设置kettle的界面时,想看看中文是什么样子的,于是就把如图的地方都改成了中文 重启后,kettle启不来了一直报错 java.lang.ArrayIndexOutOfBoundsException: 5 at org.pentaho.di.ui.spoon.dialog.TipsDialog.getTip(TipsDialog.java:191) at org.pentaho.di.ui.spoon.dialog.TipsDialog.<init>(TipsDialog.java:7

使用扫描软件扫描含有中文字符的二维码显示乱码?

在使用中琅领跑条码标签打印软件制作并打印二维码时,有些朋友也会遇到这种问题:使用扫描软件扫描含有中文字符的二维码时,扫描界面显示为一串问号(即乱码).是什么原因造成扫描中文乱码的呢?又该如何解决呢?今天就来简单介绍一下. 首先,通过中琅领跑条码标签打印软件左侧工具栏的"绘制二维条码"按钮,在画布空白区域绘制出一个二维码. 在二维码上点击鼠标右键选择"属性",在弹出的属性窗口中,选择"数据源"选项,在左侧"数据对象"栏中,先点击

测试库中文字符集乱码 PLsql报错中有乱码、有问号???等问题

测试库中文字符集乱码PLsql报错中有乱码.有问好???等问题,是字符集导致sqlplus /nologconn / as sysdbastartup 1.查询数据库中的字符集设置SQL> select userenv('language') from dual;USERENV('LANGUAGE') AMERICAN_AMERICA.WE8MSWIN12522.修改数据库的字符集SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK;

解决无法提交含有中文字符内容的表单问题--MySQL5.5

事情有点搞笑...我和后端搭档一起开发文章评论这个小功能.在开发过程中,我一直提交字母和数字的评论内容,从来没有用中文字符提交过.直到这个评论小功能基本上做完了,我偶然的用中文提交评论,居然,表单提交失败,报500的错!然而,在搭档的本地测试可以提交中文评论..奇了怪了.于是我开始打断点检查代码.后端搭档找不出他的原因,我这边js压根没问题...然后,我突然想到字符集的问题.是不是mysql数据库服务器或者数据库字符集问题!开始搜命令,敲命令. -------------------------

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

如 {$data.name|str_repeat="|",###}报错!!!

jQuery判断字符串是否含有中文字符

//判断字符串是不是中文String.prototype.isChinese = function () {    var reg = /[^\x00-\xff]/ig;//判断是否存在中文和全角字符//    var reg=/[A-Za-z]*[a-z0-9_-]|\s$/;//判断是否包含数字字母下划线  当使用这个时如果只有部分是中文字符还可以使用英文字体    if (reg.test(this)) {        return true;//存在中文    }    return

MySQL中使用group_concat()函数数据字符过长报错的问题解决方法

最近在办公软件项目,在开发权限指标遇到一个问题:我们系统的一些逻辑处理是用存储过程实现的,但是有一天客户反馈说权限指标分配报错,查了分配的权限数据牵扯到的数据权限基础资源,没有问题.权限指标分配的存储过程中有这样两句代码: SET @tests = '';SELECTGROUP_CONCAT( DISTINCT REPLACE ( concat( '''', ( indicator_content ), '''' ), ',', ''',''' ))AS Allnumber INTO @test