This is a common problem: you must understand the difference between
UTF-8 and ISO-8859-1 character encoding. Put very simply: UTF-8 is much
better for international use because it encodes most characters in use
today (including Japanese etc), however it can take more than one byte
to encode a character. ISO-8859-1 on the other hand uses only one byte
per character but is only suitable for English and Western European
languages.<br>
<br>
A common mistake is to encode a string with UTF-8 and to decode it as
ISO-8859-1. Many non-ASCII characters will appear garbled (just like in
your example) because more than one byte was used to encode them.<br>
<br>
So you must be mindful of what encoding mechanism was used to encode your string and to use the same system to decode. <br>
<br>
You can specify the character encoding you want to use in the HTML of
your form or in the HTTP headers. You will need to Google a bit for the
terms "Character Encoding", "UTF-8", "ISO-8859-1", "HTML" etc.<br>
<br>
Joe<br>
<br><br><div><span class="gmail_quote">On 9/5/05, <b class="gmail_sendername">Gonzalez, Arnau (GE Consumer Finance, consultant)</b> <<a href="mailto:arnau.gonzalez@ge.com">arnau.gonzalez@ge.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>Passing a text as a parameter from a jsp to another jsp, the special characters change.<br>For example, this line (text.jsp just return the text):<br><br><h1><a href="http://localhost:8080/text.jsp?text=">
http://localhost:8080/text.jsp?text=</a>¡hello!</h1><br><br>shows this: Â¡hello!<br><br>I've
found that if I use the hex value instead of the char it works, but the
problem is that this texts is introduced by the user and is not any
practical to obly the user to know the hex codes.<br><br>How can I solve it?<br><br>Arnau<br><br><br>_______________________________________________<br>This mail is send to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit
<br><a href="http://mail.opencms.org/mailman/listinfo/opencms-dev">http://mail.opencms.org/mailman/listinfo/opencms-dev</a><br></blockquote></div><br>