default fsenc patch
Martin Pool
mbp at canonical.com
Wed Jan 25 00:51:11 UTC 2012
On 24 January 2012 20:14, INADA Naoki <songofacandy at gmail.com> wrote:
> I sometimes use bzr on Linux without locale. I can write non-ascii comment with
> vim but bzr doesn't accept it.
I guess if you do set the locale it will be ok?
> I think get_user_encoding() should also be 'utf-8' by default.
> At least, bzr should provide a way to override user encoding. (e.g.
> BZR_USER_ENCODING envvar)
I think we can do that (there may be a bug for it). For filenames it
is harder to override what Python thinks the encoding ought to be.
vim apparently also has some issues with non-locale-encoded filenames
<http://comments.gmane.org/gmane.editors.vim.devel/28508>.
There are more dimensions on which people may want to vary (or have to
vary) than Unix's concept of locale can really capture: you might want
to write your commit message in utf-8, have filenames in euc, and have
the text interface just run in C... But, even beyond just needing to
implement those variations, we are a bit constrained what Python will
actually let us implement.
Anyhow, on the specific thing of this patch, of defaulting to utf-8,
if gz feels we should leave it in, that's ok with me. It should only
be active in fairly edge cases of having non-ascii names and an
explicitly or implicitly ascii locale.
--
Martin
More information about the bazaar
mailing list