emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extra character 194 appearing in network stream


From: Patrik Jonsson
Subject: Re: Extra character 194 appearing in network stream
Date: Sat, 17 Feb 2007 01:53:06 -0800
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Andreas Schwab wrote:
> Patrik Jonsson <address@hidden> writes:
>
>   
>> I tracked the problem down to the piece of code that packed a number
>> into a network-order 4-byte string:
>>
>>       (format "%c%c%c%c"
>>         (lsh (logand i 4278190080) -24)
>>         (lsh (logand i 16711680) -16)
>>         (lsh (logand i 65280) -8)
>>         (logand i 255))
>>
>> which when (logand i 255) >127 apparently produces a 5-character string.
>>     
>
> I cannot reproduce that.  Can you give a specific example?
>   
(string-bytes (let ((i 200))
      (format "%c%c%c%c"
        (lsh (logand i 4278190080) -24)
        (lsh (logand i 16711680) -16)
        (lsh (logand i 65280) -8)
        (logand i 255))))
gives
5

Regards,

/Patrik


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]