ср, 29 июл. 2020 г. в 10:17, Harald Klimach <har...@klimachs.de>:
>
> I just changed
> application = hgweb(config)
> to
> application = hgweb(config.encode("utf-8"))
>
> Is this the correct approach? And if so, wouldn't it be appropriate to
> suggest something similar in the hgweb.cgi file?

Sorry for the delayed response, I've just now switched my hgweb
instance to using python3.

The way core Mercurial deals with this on python3 is by just using
bytestrings. It works even on C locale, provided the path to the
config file only uses ASCII:

-config = "/path/to/hgweb.conf"
+config = b"/path/to/hgweb.conf"

This should be in the example hgweb.cgi file, I believe, and if you
want to suggest such change, it would be a good first patch :)
https://www.mercurial-scm.org/wiki/ContributingChanges
_______________________________________________
Mercurial mailing list
Mercurial@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial

Reply via email to