cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirchhoff, Lars" <Lars.Kirchh...@wincor-nixdorf.com>
Subject AW: i18n transformer and serializer charset
Date Wed, 11 Dec 2002 03:05:53 GMT
Thank you Konstantin, 

you were right, it's working with utf charset, as well as the original 
strings are using TIS-620. But now I run in a new problem. I get these
characters from a database and unfortunately the characters will be 
transformed to be html compliant. That means odd characters like this 
¡Ã are transformed to this &iexcl;&Atilde; and because of this the 
characters are not decoded correctly. 
the strange thing is that i used the following in the xsp page:

<para><xsp:expr>getData()</xsp:expr></para>
<title>¡ÃдÒɤÒÃìºÍ¹ 303HÊàµç¡«ÍÊäι«ìäι</title>

The data inside the para element is transformed to the html compliant
versions but the characters in the title element is stays like this
and are decoded correctly. 

can anybody tell me how to insert utf-8 characters from a database 
correctly into the xml document. the postgres database is UNICODE 
encoded.

ciao Lars

> -----Ursprüngliche Nachricht-----
> Von: Konstantin Piroumian [mailto:kpiroumian@apache.org]
> Gesendet: Dienstag, 10. Dezember 2002 18:06
> An: cocoon-users@xml.apache.org
> Betreff: Re: i18n transformer and serializer charset
> 
> 
> From: "Kirchhoff, Lars" <Lars.Kirchhoff@wincor-nixdorf.com>
> 
> > Hello
> >
> > I'm currently trying to create an application, which should 
> be running
> > in english, german, thai and several other asian languages.
> > The i18n transformer is working correctly, but to display 
> the characters
> > in the correct manner it is needed to use the specific 
> charset in the meta
> > tag of html.
> > Therefore I tried to setup the sitemap with different serializers
> according
> > the different languages and tried to use the locale 
> variable to select one
> > of the serializers. But this doesn't work.
> >
> > here are some snippets of my sitemap:
> >
> > ----- code -------------------------
> > ...
> >  <map:serializer name="html_th" mime-type="text/html"
> >      src="org.apache.cocoon.serialization.HTMLSerializer">
> >    <encoding>TIS-620</encoding>
> >  </map:serializer>
> >  <map:serializer name="html_de" mime-type="text/html"
> >      src="org.apache.cocoon.serialization.HTMLSerializer">
> >    <encoding>UTF-8</encoding>
> >  </map:serializer>
> 
> Why don't you use UTF-8 for all the languages? That works in 
> the Cocoon 2.1
> i18n sample for such languages as Japanese, Chinese and 
> Korean (and many
> others).
> 
> >
> > ...
> >
> >  <map:act type="locale">
> >    <map:serialize type="html_{locale}" label="debug"/>
> >  </map:act>
> 
> I'm not sure that this is supported. Are you using the 
> compiled sitemap
> engine or interpreted?
> 
> >
> > ...
> > ----- code -------------------------
> >
> > At first is this possible at all? As far as I read the 
> documentation or
> the
> > mailling list archives I could find anything.
> > At second is it possible to get the http request paramater 
> oder session
> > parameter in the sitemap.
> 
> You can easily get either request parameters, request and 
> session attributes
> in the sitemap using input modules from the latest release, e.g.:
> 
> <map:parameter name="locale" value="request-param:locale" />
> 
> See Input modules sample (/samples/module) in C2.1 for details.
> 
> Konstantin
> 
> >
> > Any help is appreciated. thanks
> >
> > ciao Lars
> >
> > 
> ---------------------------------------------------------------------
> > 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>
> 

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