Every code point in the BMP is representable with at most three bytes in UTF-8 and every code point not in the BMP takes four bytes. For each of the latter, the encoding of UTF-16 takes as many bytes; for each of the former, it takes at most 3/2 as many. Therefore one can decrease the size of the buffer allocated here. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>pull/390/head
parent
78169f397d
commit
ea0a41bcaf
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue