cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koen Pellegrims" <koen.pellegr...@pandora.be>
Subject RE: How to encode ISO-8859-1 characters into the Database?
Date Fri, 30 Aug 2002 17:24:58 GMT


> -----Oorspronkelijk bericht-----
> Van: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
> Verzonden: vrijdag 30 augustus 2002 16:05
> Aan: cocoon-users@xml.apache.org
> Onderwerp: Re: How to encode ISO-8859-1 characters into the Database?
>
>
> Koen Pellegrims wrote:
>
> >I don't know about Postgres, but with MySQL, you can set a
> parameter on the
> >jdbc-driver in web.xml
> >eg.:
> >
> ><jdbc name="mydb">
> >	<encoding>ISO-8859-15</encoding>
> >
>
> It'd better be UTF-8. Whole XML world lives in UTF-8, and Java
> characters know nothing except UTF-8 (101 of Java char type). Thus, when
> your database returns non-UTF, of course you can do some tricks to make
> result look Ok, but this does not solve the issue.
>
> Point here is when your database, say, in ISO-8859-15, and you want
> output HTML in same encoding, then it will work. But if you ask
> serializer to use other encoding (which it can do - if input is valid),
> result will be garbage, because serializer when encoding will *assume*
> that input is UTF-8 - but it is not.
>
You're absolutely right, my bad... :-)

>
> Regards,
> Vadim
>
>
>
> >	<dburl>jdbc:mysql://<server>/<db>
> ></jdbc>
> >
> >
> >
> >>-----Oorspronkelijk bericht-----
> >>Van: Antonio Gallardo Rivera [mailto:agallardo@agsoftware.dnsalias.com]
> >>Verzonden: donderdag 29 augustus 2002 10:45
> >>Aan: cocoon-users@xml.apache.org
> >>Onderwerp: Re: How to encode ISO-8859-1 characters into the Database?
> >>
> >>
> >>I create the Database now using the following string:
> >>
> >>createdb -E LATIN1 -e mydb
> >>
> >>Where,
> >>LATIN1 is the encoding used by the database
> >>mydb is the name of the database
> >>
> >>Now When I wrote: "Olé"
> >>When I retrieve the values there are: "Olé"
> >>
> >>Please, somebody know how to resolve this problem. I used at the
> >>beginning of
> >>the XSP pages the string:
> >>
> >><?xml version="1.0" encoding="ISO-8859-1"?>
> >>
> >>What I am doing wrong?
> >>
> >>Regards,
> >>
> >>Antonio Gallardo
> >>
> >>
> >>
> ...
>
>
>
> ---------------------------------------------------------------------
> 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>
>
>


---------------------------------------------------------------------
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