About encoding manipulation in Mercurial
LAO Zhongcheng
laozc at bhh.com.cn
Mon May 11 03:38:27 CDT 2009
Hi,
I'm a newbie in Python.
Is the file mercurial/changelog.py the core API of Mercurial.
I found there are some callings to fromlocal
in the line listed below of changelog#add method.
208 user, desc = util.fromlocal(user), util.fromlocal(desc)
I suppose that if a Mercurial extension is going to call this method,
it has to pass a username and description in default locale
(system locale or HGENCODING environment).
Am I right?
If it does, I don't think
it's a good idea to use local locale other than UTF-8 in core API.
It may result a character loss due to a non-well designed extension
(especially when the local locale is NOT Unicode based).
I'm adding some encoding issues to MQ extension.
It does help me for the question above.
Thank you.
Johnson Lau
More information about the Mercurial
mailing list