encoding/decoding issue with python2.5 and pymssql

Tzury Bar Yochay Afro.Systems at gmail.com
Mon Mar 24 03:56:42 EDT 2008


These are not cut&paste but typed by hand, yet they are identical to
the actual output.
seems like the first 8 bytes are swapped while the other half is
straightforward.

I deeply thank you for your assistance.

I am currently using a combination of reversed and list comprehension
to rebuild this byte array.


On Mar 24, 8:48 am, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Sun, 23 Mar 2008 22:33:58 -0700 (PDT), Tzury Bar Yochay
> <Afro.Syst... at gmail.com> declaimed the following in comp.lang.python:
>
> > for example:
> > the value
> > 'EE604EE3-4AB0-4EE7-AF4D-018124393CD7'
> > is represent as
> > '\xe3N`\xee\xb0J\xe7N\xafM\x01\x81$9<\xd7'
>
>         Are those direct cut&paste?
>
> >>> "".join(["%2.2X" % ord(x) for x in '\xe3N`\xee\xb0J\xe7N\xafM\x01\x81$9<\xd7'])
>
> 'E34E60EEB04AE74EAF4D018124393CD7'
>
> or, putting in -
>
> 'E34E60EE-B04A-E74E-AF4D-018124393CD7'
>
>         The last half is a direct match... the front half looks to have some
> byte-swapping
>
> E34E60EE => (swap shorts)    60EEE34E
> 60EEE34E => (swap bytes)     EE604EE3                ****
>
> B04A => 4AB0         ****
>
> E74E => 4EE7         ****
>
>         Anything onhttp://www.sqljunkies.com/Article/4067A1B1-C31C-4EAF-86C3-80513451FC0...
> of any help (besides the facet of using a GUID to ID the page describing
> GUIDs <G>)
>
> --
>         Wulfraed        Dennis Lee Bieber               KD6MOG
>         wlfr... at ix.netcom.com             wulfr... at bestiaria.com
>                 HTTP://wlfraed.home.netcom.com/
>         (Bestiaria Support Staff:               web-a... at bestiaria.com)
>                 HTTP://www.bestiaria.com/




More information about the Python-list mailing list