Firebird JDBC驱动程序连接字符编码 [英] Firebird JDBC driver connection character encoding

查看:363
本文介绍了Firebird JDBC驱动程序连接字符编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Fedora 17的tomcat6上运行了一个JSF应用程序,使用firebird作为数据库,并且从数据库到应用程序的所有寄存器都出现了编码问题.

I have a JSF application running on tomcat6 in Fedora 17 using firebird as the database and all the registers coming from the database to the application are coming with a encoding problem.

该语言为巴西葡萄牙语,因此我需要é和ã以及ç,所有这些特殊字符都存在问题.

The language is Brazilian portuguese so I need é's and ã's and ç and here all of these special characters come with problems.

原始源代码中的é和ã都可以,只有直接来自数据库的这些才给我带来麻烦...

The é's and ã's from the original source code are ok, only the ones coming directly from the database are causing me the trouble...

知道发生了什么吗?

在此图片中,该怪异字符应为é

Heres a image where that weird character should be é

从数据库中恢复时会发生问题.

The problem happens when it recovers from the DB.

推荐答案

在JDBC连接URL中使用encoding=ISO/UTF/WIN...查询参数已解决了该问题.

Using encoding=ISO/UTF/WIN... query parameter in the JDBC connection URL has solved the problem.

例如:

jdbc:firebirdsql:url:db?encoding=ISO8859_1

这篇关于Firebird JDBC驱动程序连接字符编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆