[PATCH 0 of 1] replace Python standard textwrap by MBCS sensitive one for i18n text

Greg Ward greg-hg at gerg.ca
Sun May 23 16:48:17 CDT 2010


On Sun, May 16, 2010 at 7:15 AM, FUJIWARA Katsunori
<fujiwara at ascade.co.jp> wrote:
> Mercurial has problem around text wrapping/filling in MBCS encoding
> environment, because standard 'textwrap' module of Python can not
> treat it correctly. It splits byte sequence for one character into two
> lines.

I'm the original author of textwrap.py, and I've been feeling guilty
about this for *years*.  Any chance you could fix textwrap itself for
a future version of Python?  Mercurial will still need a workaround as
long as it supports Python 2.6 and older, but you're probably not the
only one irritated by textwrap's bias towards Western languages.

Greg


More information about the Mercurial-devel mailing list