[Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Sep 5 18:12:43 CEST 2012


On 05/09/2012 16:18, eryksun wrote:
> On Wed, Sep 5, 2012 at 10:51 AM, Ray Jones <crawlzone at gmail.com> wrote:
>>
>> subprocess.call(['dolphin', '/my_home/testdir/\u044c\u043e\u0432'])
>>
>> Dolphin's error message: 'The file or folder
>> /my_home/testdir/\u044c\u043e\u0432 does not exist'
>
> "\u" only codes a BMP character in unicode literals, i.e. u"unicode
> literal". You forgot the 'u'.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

For the record the u prefix for literals was taken out of Python 3 but 
has been reinstated in Python 3.3, see 
http://docs.python.org/dev/whatsnew/3.3.html#pep-414-explicit-unicode-literals

-- 
Cheers.

Mark Lawrence.



More information about the Tutor mailing list