[JDEV] Problem : Perl + Accented Characters

Sylvinus Prodi sylvinus at lynucs.com
Tue Aug 6 04:09:13 CDT 2002


Hi

I'm working since yesterday on a strange issue with perl and jabber :

Here's my test script, it sends a message "yep" to my windows client without problems, as any message without accented characters
I replace "yep" by "éééééé.", it works. I replace it by "ééééééé.", i get a <stream:error>Invalid XML</stream:error> and disconnection

I think this issue is related with perl because when I send the same msg from my windows client it obviously works....

Can anyone help me pleaseeeeeee ?

Thanks in advance

sylvinus





#!/usr/bin/perl

use IO::Socket;


$jclient= IO::Socket::INET->new
(
    PeerAddr => "jabber.org",
    PeerPort => 5222,
    Proto    => "tcp",
    Type     => SOCK_STREAM,
    Timeout  => 10
) or die "Connection error\n";

$packet='<stream:stream to="158.64.60.160" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<iq type="set" id=sylvinus at 158.64.60.160/nothing><query xmlns="jabber:iq:auth"><username>sylvinus</username><password>********</password><resource>nothing</resource><
/query></iq>
<message from="sylvinus at jabber.org" to="sylvinus at 158.64.60.160/exodus" type="chat"><body>yep</body></message>
';

print $jclient $packet;
print "sending $packet\n";


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20020806/fb1c8d4f/attachment-0002.htm>


More information about the JDev mailing list