mozilla/rust — pull request #13469 by kmcallister (2014-04-11 23:02:42+00:00)
Title: Two character encoding fixes

This fixes two separate issues related to character encoding.

* Add `encode_utf16` to the `Char` trait, analogous to `encode_utf8`. `&str` already supports UTF-16 encoding but only with a heap allocation. Also fix `encode_utf8` docs and add tests.

* Correctly decode non-BMP hex escapes in JSON (#13064).