Re: [Tutor] Standardizing on Unicode and utf8

2009-02-25 Thread Kent Johnson
On Wed, Feb 25, 2009 at 12:46 PM, Thorsten Kampe wrote: > * spir (Fri, 20 Feb 2009 13:02:59 +0100) >> > Use the header: # -*- coding: utf8 -*- >> >> You don't even need fancy decoration: >> >> # coding: utf-8 >> >> is enough. > > Sure? Never heard of that. Interesting... >From PEP 263 (http://ww

Re: [Tutor] Standardizing on Unicode and utf8

2009-02-25 Thread Thorsten Kampe
* spir (Fri, 20 Feb 2009 13:02:59 +0100) > Le Fri, 20 Feb 2009 02:52:27 -0800, > "Dinesh B Vadhia" s'exprima ainsi: > > > We want to standardize on unicode and utf8 and would like to clarify and > > verify their use to minimize encode()/decode()'ing: > > > > 1. Python source files > > Use the

Re: [Tutor] Standardizing on Unicode and utf8

2009-02-25 Thread Thorsten Kampe
* Dinesh B Vadhia (Fri, 20 Feb 2009 02:52:27 -0800) > We want to standardize on unicode and utf8 Very good idea. > and would like to clarify and verify their use to minimize encode > ()/decode()'ing: > > 1. Python source files > Use the header: # -*- coding: utf8 -*- Good idea (although only

Re: [Tutor] Standardizing on Unicode and utf8

2009-02-20 Thread spir
Le Fri, 20 Feb 2009 02:52:27 -0800, "Dinesh B Vadhia" s'exprima ainsi: > We want to standardize on unicode and utf8 and would like to clarify and > verify their use to minimize encode()/decode()'ing: > > 1. Python source files > Use the header: # -*- coding: utf8 -*- You don't even need fancy

Re: [Tutor] Standardizing on Unicode and utf8

2009-02-20 Thread Kent Johnson
On Fri, Feb 20, 2009 at 5:52 AM, Dinesh B Vadhia wrote: > We want to standardize on unicode and utf8 and would like to clarify and > verify their use to minimize encode()/decode()'ing: > > 1. Python source files > Use the header: # -*- coding: utf8 -*- > > 2. Reading files > In most cases, we do

[Tutor] Standardizing on Unicode and utf8

2009-02-20 Thread Dinesh B Vadhia
We want to standardize on unicode and utf8 and would like to clarify and verify their use to minimize encode()/decode()'ing: 1. Python source files Use the header: # -*- coding: utf8 -*- 2. Reading files In most cases, we don't know the source encoding of the files being read. Do we have to