Merge: UTF-8 byte reading error
authorJean Privat <jean@pryen.org>
Fri, 7 Aug 2015 15:38:26 +0000 (11:38 -0400)
committerJean Privat <jean@pryen.org>
Fri, 7 Aug 2015 15:38:26 +0000 (11:38 -0400)
A small bug in char_at and length_of_char_at found their way and up until now did not pose any problem, however on some borderline cases (such as the 0x10FFFF example below) the char was misread as 0xFFFD.

The standard specifies the first byte of a 4 byte sequence to start with a `0b1111_0xxx` form, that the masks used in these methods did not check properly.

Pull-Request: #1617
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>


Trivial merge