[PATCH 7 of 7] templatefilters: document json filter that requires UTF-8 bytes

Yuya Nishihara yuya at tcha.org
Fri Mar 11 10:28:11 EST 2016

On Fri, 11 Mar 2016 09:39:22 -0500, timeless wrote:
> So, a reason not to document this filter is if we haven't decided to
> formally freeze at our encoding.

You mean "|json" filter might be changed to convert character encoding?

The current version does no encoding conversion. If input is UTF-8, output
is UTF-8. If input is non-UTF-8 bytes, output is those bytes encapsulated in
UTF-8 structure to comply JSON spec.

> I'm not sure if we have, and I don't know if we have enough tests for its
> input/output. If we do, then, it's OK to freeze this (if we're confident in
> the encoding).

Well, I don't think there would be a better way, but I'll happily wait the
freeze of the whole JSON formatting issues.

Thanks for the clarification.

More information about the Mercurial-devel mailing list