about coding

Robert Kern rkern at ucsd.edu
Sat Aug 6 12:43:13 CEST 2005


cantabile wrote:
> Hi, being a newbie in Python, I'm a bit lost with the '-*- coding : -*-' 
> directive.
> 
> I'm using an accented characters language. Some of them are correctly 
> displayed while one doesn't. I've written :
> -*- coding: utf-8 -*-
> 
> Is this wrong ?

It depends. Are those characters encoded as UTF-8? Or, more likely, are 
they encoded as ISO-8859-1?

> Where can I find a pratical explanation about these encodings ?

http://www.amk.ca/python/howto/unicode
http://en.wikipedia.org/wiki/Character_encoding
http://www.joelonsoftware.com/articles/Unicode.html

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter




More information about the Python-list mailing list