MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / replace_encoded_with_utf8

Function replace_encoded_with_utf8

utils/google_translate.py:85–93  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

83
84# 将编码后的中文字符替换成可阅读的中文字符
85def replace_encoded_with_utf8(lines):
86 updated_lines = []
87 for line in lines:
88 for chinese_text, encoded_value in encode_map.items():
89 encoded_key = urllib.parse.quote(chinese_text)
90 if encoded_key in line:
91 line = line.replace(encoded_key, chinese_text)
92 updated_lines.append(line)
93 return updated_lines
94
95
96#

Callers 2

translate_readmeFunction · 0.90
process_fileFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected