#459 Umlaut in personal info causes XML error

important
open
nobody
interface (140)
5
2003-07-28
2003-07-28
Rainer Schöpf
No

Entering an Umlaut (ö) in one of the personal info
fields causes an
XML error and a logout.

To reproduce:
- Connect to jabber server (in my case jabberd 1.4.2)
- Open the "My Information" dialog, select the
"Personal" tab
- Enter "Rainer" as Given Name, "Schöpf" as Full name
- Click Save

The following XML is sent to the server:
--------------------------------------------
<iq id='j3' type='set'><vCard
prodid='-//HandGen//NONSGML vGen v1.0//EN'
version='2.0' xmlns='vcard-temp'><FN>Rainer
Schöpf</FN><N><FAMILY>Sch�pf</FAMILY><GIVEN>Rainer
</GIVEN></N><NICKNAME></NICKNAME><URL></URL><ADR><STREET></STREET><EXTADD></EXTADD><LOCALITY></LOCALITY><REGION></REGION><PCODE></PCODE><COUNTRY></COUNTRY></ADR><TEL></TEL><EMAIL></EMAIL><ORG><ORGNAME></ORGNAME><ORGUNIT></ORGUNIT></ORG><TITLE></TITLE><ROLE></ROLE><DESC>Just
a plain old Gabber
user</DESC><BDAY>2003-07-28</BDAY></vCard></iq>
----------------------------------------------
Note the (non-UTF8) "ö" -- to which the server answers
"not well-formed" and terminates the stream.

- Typing "ö" in a chat window displays a y with a
diaresis (possibly character 0xFF). äöü typed by the
other partner look OK.
Looking at the raw XML I see:
(my input) <message to='etalk@conference.localhost'
type='groupchat'><body>äöü</body></message>
(reply) <message to='rainer@localhost/Gabber'
type='groupchat'
from='etalk@conference.localhost/rainer'><body>äöü</body></message>
(partner's msg) <message
from='etalk@conference.localhost/rainer'
to='rainer@localhost/Gabber'
type='groupchat'><body>test ����??</body>
(Sorry, I did not manage to paste the string correctly,
the ?????? are the six bytes 0xc3a4c3b6c3bc
representing the utf8 encoding of äöü)

If I may venture a guess: The bytes "äöü" are sent raw
to the server, when coming back from the server they
are interpreted as UTF8 and translated to some nonsense.

Rainer Schöpf <rainer.schoepf@proteosys.com>

Discussion