[PATCH] win32mbcs: wrap two more functions
Matt Mackall
mpm at selenic.com
Wed Jul 6 19:43:58 UTC 2011
On Thu, 2011-07-07 at 02:06 +0900, Shun-ichi Goto wrote:
> 2011/7/7 Matt Mackall <mpm at selenic.com>:
> > On Wed, 2011-07-06 at 18:29 +0900, Shun-ichi Goto wrote:
> >> # HG changeset patch
> >> # User Shun-ichi GOTO <shunichi.goto at gmail.com>
> >> # Date 1309944522 -32400
> >> # Node ID d6d0b2cf9ff050e9bc8e018221ffd5b62dc2df77
> >> # Parent 4b58d9402c435ebcf8cae63b27ab653ab54d1796
> >> win32mbcs: wrap two more functions to be wrapped.
> >
> > Queued for stable, thanks.
>
> Thanks.
>
> By the way, this patch raises an another issue.
> It may cause UnicodeDecodeError when message in checkwinfilename() is
> localized to non-ASCII text.
>
> Because win32mbcs wraps it to pass argument 'path' as unicode,
> 'c' and 'base' in checkwinfilename() is also unicode.
> When _("filename contains '%s', ...") goes local mbcs bytes,
> "mbcs-bytes" % c
> cause decoding "mbcs-bytes" with ASCII encoding, then generates
> UnicodeDecodeError.
>
> Do you have any good idea to avoid this issue?
> Do we need to arrange checkwinfilename()?
We might want to investigate a scheme like the localstr class in
encoding.py to isolate Mercurial from this weirdness while still
allowing Unicode filenames.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list