Re: [Tutor] Creating a unicode string from bytes and % opperator

2008-07-28 Thread Tim Golden
Wesley Brooks wrote: Thanks Tim Golden, That'll do the trick! Thought there must have been something simple for it! To be perverse, you *could* have done it like this: eval ("u'\u" + "%s%s'" % ("0d", "fe")) But please don't :) TJG ___ Tutor mailli

Re: [Tutor] Creating a unicode string from bytes and % opperator

2008-07-28 Thread Wesley Brooks
Thanks Tim Golden, That'll do the trick! Thought there must have been something simple for it! Cheers, Wesley Brooks 2008/7/28 Tim Golden <[EMAIL PROTECTED]>: > Wesley Brooks wrote: >> >> I'm trying to create a unicode character from two bytes. Unfortunatly >> I'm getting a "UnicodeDecodeError"

Re: [Tutor] Creating a unicode string from bytes and % opperator

2008-07-28 Thread Tim Golden
Wesley Brooks wrote: I'm trying to create a unicode character from two bytes. Unfortunatly I'm getting a "UnicodeDecodeError". Can some one please suggest an alternative way of doing what's bellow? In the example bellow the two bytes have been converted into a string hex value, but they could jus

[Tutor] Creating a unicode string from bytes and % opperator

2008-07-28 Thread Wesley Brooks
Dear Users, I'm trying to create a unicode character from two bytes. Unfortunatly I'm getting a "UnicodeDecodeError". Can some one please suggest an alternative way of doing what's bellow? In the example bellow the two bytes have been converted into a string hex value, but they could just as easil