[Python-Dev] PEP 385: Mercurial issues

Oleg Broytmann phd at phd.pp.ru
Wed Aug 5 17:54:15 CEST 2009


On Thu, Aug 06, 2009 at 12:34:39AM +0900, Stephen J. Turnbull wrote:
> Oleg Broytmann writes:
>  >    Dirkjan, how does Mercurial handles charsets? If I have three files in
>  > my repository - one in utf-8, another in koi8-r, and the third in cp1251
>  > encoding - I certainly don't want to convert them back and force, but I
>  > want hg web interface to provide charset in the Content-Type header.
> 
> How is this relevant to PEP 385?  I hope the answer is "not at all".

   There are non-utf8 non-ascii files in the Python source tree. Either
there should be a way to handle them in Mercurial or they have to be
converted to UTF-8 in a proper way (i.e., don't forget to rewrite charset
directives).
   Other tan that - I am pondering a switch from SVN to hg in other
projects using Python process as an example and asking questions that are
slightly off-topic (but only slightly).

> I've been there, done that, and my answer is "never again".  (I'm not
> telling you what to do with *your* repository, just that I don't see
> any good reason for having any encodings but UTF-8 in Python's.)

   We have files in at least two different encodings - utf-8 and cp1251 for
user-visible text-files on w32.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-Dev mailing list