Re: [Python-3000] Bytes to Unicode Conversion

2008-11-16 Thread Pb2Au
Ah, I understand now.  Thank you everyone for your help. ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Re: [Python-3000] Bytes to Unicode Conversion

2008-11-16 Thread Nick Coghlan
Pb2Au wrote: > On Sun, Nov 16, 2008 at 4:31 PM, Chris Rebert <[EMAIL PROTECTED]>: wrote: >> >>Already exists. Has for quite a while now: >> >>the_unicode = unicode(some_bytes, "name of encoding") > > I know that it had worked in the version 2.5, Python 3.0 rc2 doesn't > seem to recognize it as a fu

Re: [Python-3000] Bytes to Unicode Conversion

2008-11-16 Thread Chris Rebert
Ah, my bad. Should never have referred to the Python 2.6 docs. :) Replace "unicode" with "str" in my line of code and I think it should work. Cheers, Chris On Sun, Nov 16, 2008 at 12:13 PM, Pb2Au <[EMAIL PROTECTED]> wrote: > On Sun, Nov 16, 2008 at 4:31 PM, Chris Rebert <[EMAIL PROTECTED]>: wrot

Re: [Python-3000] Bytes to Unicode Conversion

2008-11-16 Thread Martin v. Löwis
> I know that it had worked in the version 2.5, Python 3.0 rc2 doesn't > seem to recognize it as a function. a) I discourage usage of unicode and str converters; consider using .encode/.decode instead b) unicode is now called str Regards, Martin ___

Re: [Python-3000] Bytes to Unicode Conversion

2008-11-16 Thread Pb2Au
On Sun, Nov 16, 2008 at 4:31 PM, Chris Rebert <[EMAIL PROTECTED]>: wrote: >> Hello, >> >> I recently changed from Python 2.5 to Python 3.0 rc2, and have >> been trying to find out how to convert byte strings (b"example") >> to unicode strings ("example"). I noticed that some of these had >> change

Re: [Python-3000] Bytes to Unicode Conversion

2008-11-16 Thread Chris Rebert
On Sat, Nov 15, 2008 at 8:46 AM, Pb2Au <[EMAIL PROTECTED]> wrote: > Hello, > > I recently changed from Python 2.5 to Python 3.0 rc2, and have > been trying to find out how to convert byte strings (b"example") > to unicode strings ("example"). I noticed that some of these had > changed in the lates

[Python-3000] Bytes to Unicode Conversion

2008-11-16 Thread Pb2Au
Hello, I recently changed from Python 2.5 to Python 3.0 rc2, and have been trying to find out how to convert byte strings (b"example") to unicode strings ("example").  I noticed that some of these had changed in the latest version. One reason for a conversion between the two is the urllib.request