Haris said:
When I submit a form where input field has
some special characters (in my language) I get some
strange characters when printing them out.
Parameters which have those characters have,
for example, %e6 in parameter string.
How do I deal with that ?
Move to UTF-8, the Unicode encoding suitable for the Internet. In many ways,
the question isn’t any more whether we can afford to use Unicode but whether
we can afford not using it. (Even in Usenet, not using UTF-8 is getting
risky, because Google Groups has difficulties with any other encoding.)
In practice, %e6 is the %-encoded form of a letter, probably “ć†in this
case, and the encoding is based on the encoding for the form, which is by
default the same as the encoding for the page, which is probably ISO-8859-2
or windows-1250.
While this may work, provided that you code the form handler to decode the
%-encoding properly and provided that users’ browsers support ISO-8859-2 (or
windows-1250, as the case may be), what happens when the user enters, say,
“π†or “Я� As such characters have no representation in ISO-8859-2, the
data is in error and the browser behavior is undefined. In practice,
browsers will do fancy things, which you might be able to cope with (in your
form handler), but it’s simpler and safer to use UTF-8.
To get started with Unicode and UTF-8, check
http://www.w3.org/International/techniques/authoring-html