That sounds like the right fix.<br><br>Nothing in DJabberd should ever deal with Perl-level UTF8.... just in bytes.&nbsp; When we get things from the XML layer (which is Perl-UTF8), we immediate turn off the flag and treat it as bytes.<br>
<br>Checked into svn r774.<br><br><div class="gmail_quote">On Fri, Mar 21, 2008 at 12:46 AM, Aleksey Luzin &lt;<a href="mailto:subscr@p34.net">subscr@p34.net</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;ve fixed this issue by adding &#39;use bytes&#39; pragma into<br>
DJabberd::Connection class.<br>
This was not issue in SQLite, because in DJabberd::Connection-&gt;write()<br>
function was one data but right on enter into function<br>
Danga::Socket-&gt;write() function data was different.<br>
<div class="Ih2E3d"><br>
<br>
Brad Fitzpatrick wrote:<br>
&gt; You have a minimal test that shows corruption going through Danga::Socket?<br>
&gt;<br>
&gt; I thought this was fixed awhile ago, and I thought the issue was in<br>
&gt; SQLite.<br>
&gt;<br>
&gt; Do you know how Unicode works in Perl? &nbsp;(with the SvUTF8 flag?)<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Mar 14, 2008 at 4:31 AM, Aleksey Luzin &lt;<a href="mailto:subscr@p34.net">subscr@p34.net</a><br>
</div><div class="Ih2E3d">&gt; &lt;mailto:<a href="mailto:subscr@p34.net">subscr@p34.net</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; Hello,<br>
&gt;<br>
&gt; &nbsp; &nbsp; I have a problem with data in VCard which stored in Russian,<br>
&gt; &nbsp; &nbsp; I see that data saved correctly in my db, but when I retrive my vcard<br>
&gt; &nbsp; &nbsp; from server I see that everything was in russian is broken.<br>
&gt; &nbsp; &nbsp; I&#39;ve investigate this issue a little and found that data changed<br>
&gt; &nbsp; &nbsp; on call<br>
&gt; &nbsp; &nbsp; function write of module Danga::Socket. Also I&#39;ve found in front<br>
&gt; &nbsp; &nbsp; of this<br>
&gt; &nbsp; &nbsp; module pragma use bytes;<br>
&gt; &nbsp; &nbsp; When I comment out this line, I&#39;ve got correct vcatds but start<br>
&gt; &nbsp; &nbsp; got the<br>
&gt; &nbsp; &nbsp; following error when sending messages in russian:<br>
&gt; &nbsp; &nbsp; 6354 ERROR DJabberd.Connection.ClientIn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 disconnected<br>
&gt; &nbsp; &nbsp; DJabberd::Connection::ClientIn=ARRAY(0x8e6f9fc) because: Wide<br>
&gt; &nbsp; &nbsp; character<br>
&gt; &nbsp; &nbsp; in syswrite at Danga/Socket.pm line 1034.<br>
&gt;<br>
&gt; &nbsp; &nbsp; How I can fix this issue?<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div>&gt; !DSPAM:47e31640160398165083049!<br>
<br>
</blockquote></div><br>