langpacks/normlang.py
Petr Šabata 948e4adf26 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/langpacks#58af9c56e3a5f739ca84998254cf7763f0a6e1df
2020-10-15 15:07:58 +02:00

8 lines
261 B
Python

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'))