stedolan/jq — pull request #452 by zmwangx (2014-06-30 03:18:11+00:00)
Title: Make @uri format string produce uppercase hexadecimal digits instead of lower case ones

According to RFC 3986 on percent encoding, uppercase hexadecimal digits are recommended:

> The uppercase hexadecimal digits 'A' through 'F' are equivalent to
the lowercase digits 'a' through 'f', respectively. If two URIs
differ only in the case of hexadecimal digits used in percent-encoded
octets, they are equivalent. **For consistency, URI producers and
normalizers should use uppercase hexadecimal digits for all percent-
encodings.**

There are also usage cases where only uppercase hexadecimal digits are allowed, e.g., in parts of the Twitter API ([Percent encoding parameters](https://dev.twitter.com/docs/auth/percent-encoding-parameters)).

See issue https://github.com/stedolan/jq/issues/451 for details.

The code is super easy to fix — simply changed `jv_string_fmt("%%%02x", ch)` to `jv_string_fmt("%%%02X", ch)` and everything should work. Test suite and manual are also updated to reflect this change.