We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 410b4a8 commit f7f762eCopy full SHA for f7f762e
pythainlp/util/encoding.py
@@ -26,4 +26,4 @@ def tis620_to_utf8(text: str)->str:
26
tis620_to_utf8("¡ÃзÃÇ§ÍØµÊÒË¡ÃÃÁ")
27
# output: 'กระทรวงอุตสาหกรรม'
28
"""
29
- return text.encode('cp1252').decode('tis-620')
+ return text.encode("cp1252", "ignore").decode("tis-620")
0 commit comments