[PATCH] help: test keyword search in translated text

Mads Kiilerich mads at kiilerich.com
Sat Jun 9 17:40:39 CDT 2012


Olav Reinert wrote, On 06/09/2012 08:47 PM:
>
> On 09.06.2012, at 14:38, Mads Kiilerich <mads at kiilerich.com> wrote:
>
>>> +Test keyword search in translated help text:
>>> +
>>> +  $ HGENCODING=UTF-8 LANGUAGE=de hg help -k blättern
>> I'm surprised this works - even on windows. It will probably break / point out some breakage somewhere at some point ;-)
> I'm even a bit surprised that the a-umlaut survived the mail transport. "hg email" states in a header that it encodes it's output as ASCII.

Yes, like the rest of Mercurial it just reliably replicates the bytes 
your editor placed in the file when it assumed it should use the utf-8 
encoding. It usually works over emails too if only google groups is left 
out of the loop. Staying completely 7-bit clean is however more safe - 
it will also survive editing with editors that assume 8-bit encodings 
like latin-1.

> And encoding the ä in the command the same way as in the output doesn't work, it must be given in plain UTF-8 encoding. Is this a bug or a feature?

The '(esc)' format is only implemented for output matching. It could be 
convenient to have it for command lines too so this, 
test-http-branchmap.t, test-branch-option.t and test-revset.t could be 
clean ascii.

-Mads



More information about the Mercurial-devel mailing list