Created
November 22, 2023 03:44
-
-
Save lixiaoquan/eb01b24c0824a287c4d12312443cf824 to your computer and use it in GitHub Desktop.
Decode special characters in Cygwin path
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
ss = "\uf03a" | |
print(f"Unicode char used by cygwin to represent : in path {ss} {[ss]}") | |
value = ord(ss) | |
print(f"Convert it to hex number {(hex(value))}") | |
# https://cygwin.com/cygwin-ug-net/using-specialnames.html | |
value -= 0xf000 | |
new_unicode_char = chr(value) | |
print(f"Subtract 0xf000 -- {new_unicode_char}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment