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 decode('utf8') after reading from file?

3. Writing files
We will always write to files in utf8.  Do we have to encode('utf8') before 
writing to file?

Is there anything else that we have to consider?

Cheers

Dinesh

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to