cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Romayev <roma...@yahoo.com>
Subject Re: AW: Encoding problem with HTML-serializer and URLs
Date Tue, 15 Oct 2002 09:30:51 GMT
Take a look at this thread, you might be able to find
your answer there:
http://marc.theaimsgroup.com/?t=103234393800004&r=1&w=2

Cheers,
-Alex
--- Stefan Riegel <stefan.riegel@telig.de> wrote:
> Thank You Alex,
> 
> but this did not change any behaviour. Sending the
> "o" from a form works
> fine as it did without the
> SetCharacterEncodingAction.
> 
> I guess the problem has to do with
> 
> 1. Encoding ISO-8859-1 in href-attributes to the
> encoding scheme used in
> URLs and
> 2. decoding back to ISO-8859-1
> 
> Somewhere the encoding information gets lost or
> whatever. I don't understand
> exactly what happens.
> 
> I don't understand character encoding in detail but
> shouldn't be represented
> the ISO-8859-1 "o" in an URL as "%F6"? If this is
> true, the problem could be
> in the HTML serializer which does assume characters
> in href attributes
> always as "UTF-8"?!? Yes this makes sense, doesn't
> it?
> 
> 
> Regards
> Stefan
> 
> -----Ursprungliche Nachricht-----
> Von: Alex Romayev [mailto:romayev@yahoo.com]
> Gesendet: Montag, 14. Oktober 2002 18:29
> An: cocoon-users@xml.apache.org;
> stefan.riegel@telig.de
> Betreff: Re: Encoding problem with HTML-serializer
> and URLs
> 
> 
> Try this in your sitemap:
> 
> <map:action name="set-character-encoding"
>
src="org.apache.cocoon.acting.SetCharacterEncodingAction"/>
> 
> and
> 
> <map:act type="set-character-encoding">
>  <map:parameter name="form-encoding"
> value="your-encoding"/>
> </map:act>
> 
> --- Stefan Riegel <stefan.riegel@telig.de> wrote:
> > Hello,
> >
> > doing the following I do not get the expected
> > results. The german umlaut
> > with "ISO-8859-1" converts magically to "UTF-8".
> All
> > encodings
> > (html-/xml-serializers, xml-files, xsl-files) are
> > set to "ISO-8859-1"
> >
> > src.xml:
> > --------
> >
> > <html>
> > <head>
> > ...
> > <a href="dest?selection=v">v</> (v = german umlaut
> > for "oe")
> > ...
> > </html>
> >
> > Sitemap snippet:
> > ----------------
> >
> > ...
> > <map:generate type="file" src="src.xml" />
> > <map:serialize type="html" />
> > ...
> >
> > Produced output:
> > ----------------
> >
> > ...
> > <a href="dest?selection=%C3%B6">&ouml;</a>
> > ...
> >
> > If I click the link I see the same
> > "selection"-string in the Browser URL. I
> > did expect the destination "dest" restoring the
> same
> > character with the same
> > encoding.
> >
> > dest.xml
> > --------
> >
> > ...
> > <dest>
> >   Selection=
> > </dest>
> > ...
> >
> > dest.xsl
> > --------
> >
> > ...
> > <dest>
> >   <xsl:value-of select="dest" />
> >   <xsl:value-of select="$selection" />
> > </dest>
> > ...
> >
> > the sitemap ends with a xml-serializer
> >
> > Output
> > ------
> >
> > <dest>Hi="an A with a tilde on top"</dest>
> >
> >
> > This funny character is an v (&ouml;) in UTF-8.
> >
> > I did try some proposals like setting encoding in
> an
> > action
> > (request.setCharacterEncoding). Nothing works for
> > me.
> >
> >
> > Any ideas? I have to send selection-criteria for a
> > database as
> > URL-parameters.
> >
> >
> > Regards
> > Stefan
> > --
> >
> > Stefan Riegel
> >
> > TELIG GmbH
> > Ziegelstra_e 27
> > D-71063 Sindelfingen
> > GERMANY
> >
> > Phone:  +49-7031-79433-30
> > Fax:    +49-7031-79433-43
> > Mobile: +49-174-4025031
> >
> >
> >
>
---------------------------------------------------------------------
> > 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