[patch] unicode problem with DJabberd::RosterStorage::SQLite

Brad Fitzpatrick brad at danga.com
Sat Sep 22 20:56:19 UTC 2007


A perl program has to use Perl's UTF8 scalars everywhere, or nowhere,
otherwise introducing them (as this patch does) starts the contagious
spread of them... whenever one touches a non-UTF8 scalar, perl starts
converting the one that's touched.

I imagine we do use it, though, as XML libraries tend to use it?

So this _should_ be safe and the correct fix (I've seen the same bug,
btw), but I want somebody to double-check we are using Perl's UTF-8 for
djabberd...

Can somebody look at Devel::Peek on a scalar (say a username) when a
non-ASCII username comes in, and see if the SvUTF8 flag is on?

- Brad


On Fri, 21 Sep 2007, Michael Scherer wrote:

> Hi,
> while changing the name of some people in my roster, I have seen that
> DBD::SQLite
> ( version 1.13 ) send back the name without explicitly marking them as unicode.
>
> So, after a reconnection, my jabber client do not display correctly the name,
> clearly showing a conversion problem.
>
> After searching on the web, i found out this thread (
> http://www.perlmonks.org/?node_id=491787 ), and so, I propose the attached
> patch,
> that solved the problem for me.
>
>
> --
> Michael Scherer


More information about the Djabberd mailing list