cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Romayev <roma...@yahoo.com>
Subject Re: Encoding problem with HTML-serializer and URLs
Date Mon, 14 Oct 2002 16:28:45 GMT
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=÷">÷</> (÷ = 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 ÷ (&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>


Mime
View raw message