This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# translated from: http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/94cc251d0c45/src/share/npt/utf.c | |
def utf8s_to_utf8m(string): | |
""" | |
:param string: utf8 encoded string | |
:return: modified utf8 encoded string | |
""" | |
new_str = [] | |
i = 0 | |
while i < len(string): |