cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: esql character encoding problem
Date Wed, 18 Dec 2002 17:12:20 GMT
On 18.Dec.2002 -- 05:33 PM, wrote:
> I'm using ESQL to read and write data from a MYSQL database.
> When I fill a field with non US characters, I see strange characters instead of the ones
I expected.
> For example, when I write the string "òàù", this is written like "=a?", even if when
I red it with ESQL I get back the right string.
> if I manually try from mysql prompt:
> "INSERT INTO table VALUES ('òàù')", the data is properly stored.
> I've read an article at
> about a similar subject, but the author speak of a request generator and an XML serializer,
while I'm using an xsp generator and an html serializer:
> <map:match pattern="*/*.html">
>    <map:generate type="serverpages" src="{1}/{2}.xsp"/>
>    <map:transform src="{1}/{2}.xsl"/>
>    <map:serialize type="html"/>
> </map:match>
> They suggest to use the SetCharacterEncodingAction, but it hasn't solved my problem.
> MySQL uses the default ISO-8859-1 encoding and I've added the ISO-8859-1 encoding to
the html serializer:
> <map:serializer logger="sitemap.serializer.html" mime-type="text/html" ...>
>   <encoding>ISO-8859-1</encoding>
>   <buffer-size>1024</buffer-size>
> </map:serializer>
> I've tried to add the same encoding element to the serverpages generator, but it didn't


your JDBC driver is supposed to return unicode to the application. If
it doesn't, it is either broken or you did not tell the DBMS the
correct character encoding. IOW this problem would appear with any
java application using your data. Please check.

The esql:get-string tag accepts an additional encoding parameter to do
conversions but YMMV. Search this list, there have been some good
explanations of this recently.


Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message