getdefaultencoding - how to change this?

Robert Kern robert.kern at gmail.com
Fri Jan 21 11:31:51 EST 2011


On 1/21/11 5:43 AM, John Pinner wrote:
> On Jan 20, 4:46 pm, Robert Kern<robert.k... at gmail.com>  wrote:
>
> <snips>
>
>>
>> Instead, you want to use an encoding declaration in each file:
>>
>> http://docs.python.org/reference/lexical_analysis.html#encoding-decla...
>
> All that this does is tell the interpreter how the source file is
> encoded, it does not affect default encodings etc.

Yes! In the part of the OP's message that you snipped "(My favourite editor 
cannot be told to use unicode.)", that seemed to be part of his actual problem, 
not the default encoding.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list