From: Addison Phillips [wM] (firstname.lastname@example.org)
Date: Tue Jan 13 2004 - 12:48:56 EST
German characters not correct in output webformHi Bert,
This is a common problem.
When you do a form submit (POST or GET of data to the server), the browser encodes the characters being sent using the character encoding that the page uses. In your case, from the examples you sent, this encoding is Unicode UTF-8. UTF-8 is a multibyte encoding of Unicode in which non-ASCII characters take two or more bytes. In this case, the German accented characters each take two bytes.
When the server receives the data, it decodes the original bytes sent by the browser. The problem is: what encoding should be used to interpret the bytes? For historical reasons, most Web servers (include J2EE, .NET, Apache/Tomcat, etc.) default to using ISO-8859-1 (Latin-1), a single byte Western European encoding. This is what is happening in your case: each UTF-8 byte is being treated as a single character, leading to the corruption you are experiencing. You can see that each German character is interpreted as a sequence of two bytes.
You might want to be aware of the W3C's Internationalization mailing list (See http://lists.w3.org/Archives/Public/www-international/) and of the FAQs at http://www.w3.org/International/geo (alas, the FAQ on this topic hasn't been published yet!)
Addison P. Phillips
Director, Globalization Architecture
webMethods | Delivering Global Business Visibility
Chair, W3C Internationalization (I18N) Working Group
Chair, W3C-I18N-WG, Web Services Task Force
Internationalization is an architecture.
It is not a feature.
From: email@example.com [mailto:firstname.lastname@example.org]On Behalf Of Bert Kemner
Sent: lundi 12 janvier 2004 22:38
Subject: German characters not correct in output webform
The input of the form contains german characters.
But the output (which is generated by submitting the form) does not
display those characters (see example beneath). My first reaction to
this problem is that Unicode somehow does not translate these german
characters to Windows (Outlook).
Example form output:
Sender: Receiver: email@example.com
Vor- und Zuname:: Birgitta MÃƒÂ¼he
Firma / Institution:: Ãƒ?ffentliche BÃƒÂ¼cherei Mainz
Ihre Fragen und Anregungen:: Wir interessieren uns fÃƒÂ¼r eine
Abonnement der Print-Ausgabe der britischen Tageszeitung "Times". Ist
dies ÃƒÂ¼ber Sie mÃƒÂ¶glich und wenn ja zu welchen Konditionen.
(Preis, wann wird zugestellt? ...)
Can you help me with this, or suggest something?
I really appreciate your help.
Swets Information Services,
Swets Information Services
2160 SZ Lisse
2161 CA Lisse
T +31 (0)252 435 241
F +31 (0)252 415 888
This archive was generated by hypermail 2.1.5 : Tue Jan 13 2004 - 13:52:12 EST