From: David G. <go...@py...> - 2006-04-25 14:34:23
|
[eng...@ss...] >>> any reason why I should not put encoding declarations into the py >>> files ? >> >> No; go ahead. Be sure to use UTF-8: # -*- coding: utf-8 -*- But don't do anything yet; read on. > a lot of :: > > /usr/src/other/docutils/docutils/test/package_unittest.py:135: > DeprecationWarning: Non-ASCII character '\xc3' in file > /usr/src/other/docutils/docutils/test/test_readers/test_python/test_pa= rser.py > on line 6, but no encoding declared; see > http://www.python.org/peps/pep-0263.html for details > mod =3D __import__(name) > > messages. I see; it's in the comments. > * but only on the first call of test/alltest.py after boot. > no warnings on following calls. I think it's actually only on the first import after an edit or other change (svn up). The warning is happening on byte-code compile. Once compiled, the .pyc files contain no offending text (comments are ignored). > * and it is this is a local problem, i need to check out in english > the $Id$ is expanded in german here. We don't use $Id$. Perhaps you mean $Date$ or $Revision$? What do they expand to? What encoding is used? If it's UTF-8, we may be OK. If it's your locale's default encoding, we're in trouble, because every system could be different. -- David Goodger <http://python.net/~goodger> |