[PATCH 3 of 6] hgweb: set encoding to utf-8

timeless timeless at gmail.com
Tue Jan 12 18:49:56 CST 2016


On Tue, Jan 12, 2016 at 4:13 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Tue, 2016-01-12 at 12:38 -0600, timeless wrote:
>> # HG changeset patch
>> # User timeless <timeless at mozdev.org>
>> # Date 1452621820 0
>> #      Tue Jan 12 18:03:40 2016 +0000
>> # Node ID 198238d09e72b4d83f212120af8175a67e99dde2
>> # Parent  a4f6489df893272a532f9d9cf88b12fd0619efc6
>> hgweb: set encoding to utf-8
>
> (I think you mean "serve" here, not hgweb, because you're only touching
> commands.)

I dithered over calling It serve (which I did originally) and hgweb.

> It's not an accident that we inherit the web server encoding from the locale.
>
> If you have, say, a shift-jis or a cp1252 locale, this allows your filenames to
> be displayed correctly when you run hg serve.

The current behavior results in garbage if your server is using
Japanese or similar localization.

This patch should still allow that if you pass --encoding to hg serve.

FWIW, To get localizations to display correctly will require more than
the series here, so it's ok if we don't take this step now. I can look
into it further later. This is my first round of looking at
serve/hgweb, I've mostly ignored it of late.


More information about the Mercurial-devel mailing list