配置 PWM ADC LCD
This commit is contained in:
10
tools/to_escape.py
Normal file
10
tools/to_escape.py
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
|
||||
def main():
|
||||
text = sys.argv[1] if len(sys.argv) > 1 else input("Enter Chinese: ")
|
||||
escaped = ''.join(f'\\x{b:02X}' for b in text.encode('utf-8'))
|
||||
print(escaped)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user