Patch #495401: Count number of required bytes for encoding UTF-8 before allocating the target buffer.
Patch #495401: Count number of required bytes for encoding UTF-8 before
allocating the target buffer.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator