PDA

View Full Version : Help quercus + tomcat + wordpress + mysql


dreyser
02-10-2010, 03:44 PM
Hi quercus gurus, need some help plz

Let me explain my current situation, I have a java application developed using struts (running on tomcat 6, and mysql 4.1), and I'm tryign to add a blog to the site so I've installed quercus 4 and wordpress 2.9.1, everything seems to be working fine on wordpress in english. However the site is in spanish and I need the blog to be in spanish too so it can accept accented characters.

Wordpress is storing all spanish characters as '??' symbols in the DB, and obviously displayed the same way on the blog when retrieved from the DB. Solutions that I've found and tried are:


Set DB charset and collation to latin1
Set charset in header.php (wordpress file) to ISO-8859-1
Set wordpress language to es_ES (wordpress config file)
Set script encoding in quercus servlet (web.xml) to ISO-8859-1
Set in php.ini the options unicode.output_encoding = "ISO-8859-1" and unicode.runtime_encoding = "ISO-8859-1"
And also tried all of them using UTF8 charset


My guess is that the problem is in quercus interpretation of those characters, but apparently I can´t change it's behavior because I keep getting the same result '??' symbols instead of accented characters

Am I missing something or doing something wrong??

Thanks in advance for the help

P.S you can check the site at: http://www.minuevodepa.com/blog

nam
02-21-2010, 04:36 AM
Hi,

The encoding is a known issue. Unfortunately, the problem lies in the MySQL JDBC driver's inability to use a binary encoding. The driver forces an encoding on the binary data sent to and returned by the database. Quercus uses ISO-8859-1 for the connection encoding because that is what PHP uses, and it's the closest that we can get to a binary connection. But UTF-8 data that get returned by the database that is not in the ISO-8859-1 becomes garbled by the driver.

We have a solution in the works, but it will be a while before it becomes production ready.

dreyser
02-22-2010, 09:32 PM
Thanks Nam for the response, I guess I'll have to find another way to deal with it until the solution is ready.

Maybe using apache for PHP and Tomcat for JSP's, let's see

Regards