with resin I do the following : - in mysql change all text fields into utf8 : name char(50) collate utf8_unicode_ci, - in database specification of resin.conf (inside <driver>) add utf8 param <init-param characterEncoding="utf8" />
Stefan Graf wrote: > Hello, > > I do realize that this might not be the ideal way to ask questions about > quercus but the quercus mailing list doesn't work like so many other > things on thise website. > > I'm trying to use a MySQL database based on utf8 charset with quercus > php but any non-standard characters will show up as question marks ? and > I have not found any way to change the charset used by quercus to read > data from the database. Basically it's database connection is stuck with > ISO-8859-1 encoding although they state at several places that Quercus > is natively utf8. > > My setup is Tomcat 6.0.16 with Quercus 3.1.5 > > Basically I need to know how I can get a database connection that will > allow me to display text comming from the utf8 based database with all > the correct characters. > > Thanks for any help > > Stefan Graf > > > > > This is my current configuration: > > --- _web.xml_ <http://web.xml/> --- > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <web-app id="TestWeb" version="2.5" > xmlns="_http://java.sun.com/xml/ns/javaee_" > xmlns:xsi="_http://www.w3.org/2001/XMLSchema-instance_" > xsi:schemaLocation="_http://java.sun.com/xml/ns/javaee_ > _http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd_"> > > > > <display-name>TestWeb</display-name> > <description>Test Web Application</description> > > > > <resource-ref> > <description>DBConnection</description> > <res-ref-name>jdbc/mydb</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > > > <servlet> > <servlet-name>Quercus</servlet-name> > <servlet-class> > com.caucho.quercus.servlet.QuercusServlet > </servlet-class> > <init-param> > <param-name>ini-file</param-name> > <param-value>WEB-INF/php.ini</param-value> > </init-param> > <init-param> > <param-name>database</param-name> > <param-value>java:comp/env/jdbc/mydb</param-value> > </init-param> > <load-on-startup>1</load-on-startup> > </servlet> > > > > <servlet-mapping> > <servlet-name>Quercus</servlet-name> > <url-pattern>*.php</url-pattern> > </servlet-mapping> > > > > <welcome-file-list> > <welcome-file>index.php</welcome-file> > <welcome-file>index.html</welcome-file> > <welcome-file>index.htm</welcome-file> > </welcome-file-list> > > > > </web-app> > > > > > > --- context.xml --- > > > > <Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource" > maxActive="100" maxIdle="30" maxWait="10000" > username="user" password="password" > driverClassName="com.mysql.jdbc.Driver" > > url="jdbc:mysql://localhost:3306/mydb?autoReconnect=true&characterEncoding=utf8"/> > > > ------------------------------------------------------------------------ > > _______________________________________________ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest -- Très cordialement, Riccardo Cohen ------------------------------------------- Articque http://www.articque.com 149 av Général de Gaulle 37230 Fondettes - France tel : 02-47-49-90-49 fax : 02-47-49-91-49 _______________________________________________ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest