Home >Database >Mysql Tutorial >saiku中文查询(鉴于有人提问:saiku执行mdx,有中文报错)

saiku中文查询(鉴于有人提问:saiku执行mdx,有中文报错)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 15:54:431541browse

有人问我saiku的中文查询问题: saiku默认执行英文,很多人,在mysql里录入了中文,使用sql语言查询没有问题。 可是,用saiku的mdx查询,就会报错。 这是因为mysql默认支持中文查询。而saiku不行,尤其是utf-8编码格式。一般gbk编码可能还可以。 所以出现:m

有人问我saiku的中文查询问题:

saiku默认执行英文,很多人,在mysql里录入了中文,使用sql语言查询没有问题。

可是,用saiku的mdx查询,就会报错。

这是因为mysql默认支持中文查询。而saiku不行,尤其是utf-8编码格式。一般gbk编码可能还可以。

所以出现:mdx执行报错。而把mdx转换成的sql语言,却能在mysql里查出结果。

解决:saiku设置中文编码。在启动文件中,加上一个-Dfile.encoding=UTF-8

指定编码方式。就可以了

具体语句如下:

export CATALINA_OPTS="-Xms256m -Xmx768m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.awt.headless=true"

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn