[jdev] MAGIC
Trejkaz
trejkaz at trypticon.org
Fri Sep 30 03:29:22 CDT 2005
On Fri, 30 Sep 2005 04:25, John Talbot wrote:
> I just added 'use utf8;' in my script, and it worked!
>
> That's strange again, I thought these libraries would just flush
> whatever's on their input to the Jabber server. What's the difference I
> mean if Perl thinks a text is 5 characters or 10, as long as it flushes
> everything?
Darn, this trickled in right after I wrote the other reply. :-)
The answer to this is...
If Perl thought the original file was, say, ISO-8859-1, the accented
characters would have been read as those accented characters. The XML stream
being sent to the Jabber server has to be in UTF-8, so it then proceeds to
encode those characters as two bytes each.
So I guess what you were seeing come out the other end was the result of that
encoding it was adding.
TX
--
Email: Trejkaz Xaoza <trejkaz at trypticon.org>
Web site: http://trypticon.org/
Jabber ID: trejkaz at jabber.zim.net.au
GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F A62C B8C7 BC8B 037E EA73
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20050930/0886fffe/attachment-0002.pgp>
More information about the JDev
mailing list