cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: esql character encoding problem
Date Wed, 18 Dec 2002 17:12:20 GMT
On 18.Dec.2002 -- 05:33 PM, pmirco@inwind.it wrote:
> SORRY I'VE POSTED THIS YET BUT I FORGOT THE SUBJECT
> 
> 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
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=103701015026425&w=2
> 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
work.

Hi,

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.

	Chris.

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
haul@informatik.tu-darmstadt.de
    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.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message