You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langpacks/SOURCES/normlang.py

8 lines
261 B

import ctypes
import sys
fontconfig = ctypes.CDLL("libfontconfig.so.1")
fontconfig.FcLangNormalize.argtypes = [ctypes.c_char_p]
fontconfig.FcLangNormalize.restype = ctypes.c_char_p
print(fontconfig.FcLangNormalize(sys.argv[1].encode('utf-8')).decode('utf-8'))