Mantis - Quercus
Viewing Issue Advanced Details
3772 minor always 11-18-09 19:13 03-11-13 18:22
nam  
nam  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.36  
0003772: drupal utf-8 issue
(rep by bago)

http://forum.caucho.com/showthread.php?t=127&page=2 [^]

About the previous post, maybe the issue is in drupal trying to "eval"uing some text read from db and this text contains UTF-8, but for some reason quercus read it as iso-8859-1.

It's 2 years I'm testing quercus and still I'm having issues with mysql and encoding: I read around any guide about jdbc url parameters, queries to set names/charset, but I'm unable to make it work.

Reading around it seems a common issue.

Caused by: com.caucho.quercus.QuercusExecutionException: java.lang.IllegalStateException buffer length is not large enough to decode UTF-8 data
    at com.caucho.vfs.StringStream.read(StringStream.java:80)
    at com.caucho.vfs.ReadStream.readBuffer(ReadStream.java:1122)
    at com.caucho.vfs.ReadStream.readChar(ReadStream.java:533)
    at com.caucho.quercus.parser.QuercusParser.read(QuercusParser.java:5267)

Notes
(0004560)
sblommers   
05-11-10 06:11   
I have this same issue. Even version 4.0.7 still does this. There are some defaults that Quercus uses for conditions that are always true. Some research needs to be done here. I am using node_load (drupal method) using the Quercus script language that returns me ISO-8859-1 but it is doing as if it is UTF-8. Drupal (6.16) does everything ok over QuercusServlet.

When I node_load using the QuercusScriptEngine I get a ObjectExtValue, every StringValue that I need from that (containsKey .. etc) I convert that and everything is well:

This is the code I use. If Caucho will not fix this soon I'll fix it myself and send a patch here.

Conversioncode: return new String(input.toString().getBytes("ISO-8859-1"), "UTF8");

(0005234)
dicr   
05-11-11 15:20   
Use /*!40101 set names utf8 */ and characterSetResult=utf8.
Quercus use incorrect characterEncodinf=iso-8859-1 in which utf-8 data can't be transfered from mysql to client and it corrupting (stripping) to "??????????".
(0005235)
dicr   
05-11-11 15:22   
Seems caucho teem using only latin chars in native speaking, so they don't know about UTF-8 problems :)
(0006213)
nam   
03-11-13 18:22   
The MySQL encoding problem is fixed:

http://forum.caucho.com/showthread.php?p=36255#post36255 [^]