VCard and roster in UTF.

Brad Fitzpatrick brad at danga.com
Fri Mar 21 15:07:10 UTC 2008


That sounds like the right fix.

Nothing in DJabberd should ever deal with Perl-level UTF8.... just in
bytes.  When we get things from the XML layer (which is Perl-UTF8), we
immediate turn off the flag and treat it as bytes.

Checked into svn r774.

On Fri, Mar 21, 2008 at 12:46 AM, Aleksey Luzin <subscr at p34.net> wrote:

> I've fixed this issue by adding 'use bytes' pragma into
> DJabberd::Connection class.
> This was not issue in SQLite, because in DJabberd::Connection->write()
> function was one data but right on enter into function
> Danga::Socket->write() function data was different.
>
>
> Brad Fitzpatrick wrote:
> > You have a minimal test that shows corruption going through
> Danga::Socket?
> >
> > I thought this was fixed awhile ago, and I thought the issue was in
> > SQLite.
> >
> > Do you know how Unicode works in Perl?  (with the SvUTF8 flag?)
> >
> >
> > On Fri, Mar 14, 2008 at 4:31 AM, Aleksey Luzin <subscr at p34.net
> > <mailto:subscr at p34.net>> wrote:
> >
> >     Hello,
> >
> >     I have a problem with data in VCard which stored in Russian,
> >     I see that data saved correctly in my db, but when I retrive my
> vcard
> >     from server I see that everything was in russian is broken.
> >     I've investigate this issue a little and found that data changed
> >     on call
> >     function write of module Danga::Socket. Also I've found in front
> >     of this
> >     module pragma use bytes;
> >     When I comment out this line, I've got correct vcatds but start
> >     got the
> >     following error when sending messages in russian:
> >     6354 ERROR DJabberd.Connection.ClientIn             1 disconnected
> >     DJabberd::Connection::ClientIn=ARRAY(0x8e6f9fc) because: Wide
> >     character
> >     in syswrite at Danga/Socket.pm line 1034.
> >
> >     How I can fix this issue?
> >
> >
> >
> > !DSPAM:47e31640160398165083049!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/djabberd/attachments/20080321/2e588b07/attachment.html 


More information about the Djabberd mailing list