Improving file name encoding support on Windows
yuya at tcha.org
Thu Sep 5 18:46:13 EDT 2019
On Thu, 5 Sep 2019 14:45:12 -0400, Augie Fackler wrote:
> > For my specific use case, always using UTF-8 would be enough. My suggestion would be to add a global setting. At first, the default would be 'mbcs' (which means: use the active code page) with the 'replace' error handler. This would be equivalent to the current behavior on Python up to version 3.5, but with the advantage that the behavior is consistent on all Python versions (even Python 3.6 and later). It would give core code and in-tree and out-of-tree extensions time to migrate to the new behavior. People interested in interoperability could set this setting to 'utf-8'. If someone invests the time to implement the hybrid mode, the default could be changed to that at some later point.
> This doesn't sound awful as a plan to me, especially if you've got the time to send us some patches. Yuya, is this enough of an improvement over the status quo that it's worth doing?
Seems fine so long as the config knob is documented as experimental. However,
doing that probably means implementing a utf-8 version of vfs, which is pretty
much the same as the original WindowsUTF8 plan. The difference is how to
select the wdirvfs object, config vs repo-requirement or heuristic.
More information about the Mercurial-devel