简体   繁体   English

JasperReports Server:数据库编码问题-西里尔符号未显示

[英]JasperReports Server: DB encoding issue - the Cyrillic symbols are not displaying

I'm trying to run report on JasperReports Server . 我正在尝试在JasperReports Server上运行报告。 My MySQL db encoding is cp1251. 我的MySQL db编码是cp1251。
The result of running report 运行报告的结果

� "Emika" Ltd, 3 
������� 2012

?- must be the Russian symbols. ?-必须是俄语符号。 I found solution to set URL in report datasource 我找到了在报表数据源中设置URL的解决方案

jdbc:mysql://localhost:3306/database?useUnicode=true&characterEncoding=cp1251. 

But it doesn't works. 但这是行不通的。 What I'm doing wrong? 我做错了什么?

Connection settings are 连接设置为

    Variable_name       Value   
character_set_client        cp1251  
character_set_connection        cp1251  
character_set_database  cp1251  
character_set_filesystem        binary  
character_set_result        cp1251  
character_set_server        cp1251  
character_set_system        utf8    

I resolve the problem. 我解决了这个问题。 I set the parameter init-connect="SET NAMES utf8" in file /etc/mysql/my.cnf 我在文件/etc/mysql/my.cnf中设置了参数init-connect =“ SET NAMES utf8”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM