<?xml version="1.0" encoding="windows-1252"?>
<node id="401127" title="Re^2: Weird error with Cryprt::Blowfish and Crypt::DES" created="2004-10-21 07:36:58" updated="2005-06-13 21:16:43">
<type id="11">
note</type>
<author id="85294">
Beechbone</author>
<data>
<field name="doctext">
Got it:

&lt;code&gt;
Perl:   a7 53 64    81   c6  0a 30    b9
C:   c2 a7 53 64 c2 81 c3 86 0a 30 c2 b9
&lt;/code&gt;

So the internal strings of Net::SSH::Perl got "infected" with the UTF-8 bit. Seems some of the strings it gets are declared in a "use utf8" area (but are 7bit themselves).&lt;p&gt;

Now, as what Net::SSH::Perl gives to Cypher::* are binary data (byte strings) regardless of the input strings (character strings), how would I best fix that?&lt;p&gt;

I see three possibilities:&lt;p&gt;

1) Fix Net::SHH::Perl to make a difference between character strings it gets and the byte strings it uses to build the SSH protocol in it.&lt;p&gt;

2) Change our code to disable the UTF8 bit on every string that is given to Net::SSH::Perl.&lt;p&gt;

3) Change Crypt::* to turn the UTF8 bit off on data that is 8 characters long.&lt;p&gt;

I'd say #1 would be the cleanest way and #3 the fastest. As we have a deadline of this afternoon for a complete program run, I will implement #3 as a workaround fast. But, what should we do on the long run?&lt;p&gt;

BTW: Thank you to all who helped, tried to help, or would have helped if they could.&lt;p&gt;

&lt;hr&gt;

Update:&lt;p&gt;

&lt;strike&gt;HELP, How DO I do this? I've got the String as above labeled 'Perl' with UTF8 on. When I just disable the flag, I get the 'bad' String, as labelled with 'C'. So how do I convert that string to a string of 8 bytes with the values as they should be?&lt;/strike&gt;&lt;p&gt;

&lt;hr&gt;

Update2:&lt;p&gt;

Ok, I found that, too. &lt;code&gt;utf8::downgrade($data);&lt;/code&gt;


&lt;div class="pmsig"&gt;&lt;div class="pmsig-85294"&gt;
&lt;hr&gt;&lt;small&gt;&lt;sub&gt;Search,&lt;/sub&gt; Ask, &lt;sup&gt;Know&lt;/sup&gt;&lt;/small&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
400934</field>
<field name="parent_node">
400965</field>
</data>
</node>
