Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
Tools /
unicode /
Delete
Unzip
Name
Size
Permission
Date
Action
python-mappings
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
Makefile
1.72
KB
-rw-r--r--
2024-03-19 22:46
comparecodecs.py
1.41
KB
-rwxr-xr-x
2024-03-19 22:46
gencjkcodecs.py
1.97
KB
-rw-r--r--
2024-03-19 22:46
gencodec.py
12.03
KB
-rw-r--r--
2024-03-19 22:46
genmap_japanese.py
10.07
KB
-rw-r--r--
2024-03-19 22:46
genmap_korean.py
2
KB
-rw-r--r--
2024-03-19 22:46
genmap_schinese.py
5.08
KB
-rw-r--r--
2024-03-19 22:46
genmap_support.py
6.05
KB
-rw-r--r--
2024-03-19 22:46
genwincodec.py
1.7
KB
-rw-r--r--
2024-03-19 22:46
genwincodecs.bat
208
B
-rw-r--r--
2024-03-19 22:46
listcodecs.py
1021
B
-rw-r--r--
2024-03-19 22:46
makeunicodedata.py
47.52
KB
-rw-r--r--
2024-03-19 22:46
mkstringprep.py
9.95
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
"""This script generates a Python codec module from a Windows Code Page. It uses the function MultiByteToWideChar to generate a decoding table. """ import ctypes from ctypes import wintypes from gencodec import codegen import unicodedata def genwinmap(codepage): MultiByteToWideChar = ctypes.windll.kernel32.MultiByteToWideChar MultiByteToWideChar.argtypes = [wintypes.UINT, wintypes.DWORD, wintypes.LPCSTR, ctypes.c_int, wintypes.LPWSTR, ctypes.c_int] MultiByteToWideChar.restype = ctypes.c_int enc2uni = {} for i in list(range(32)) + [127]: enc2uni[i] = (i, 'CONTROL CHARACTER') for i in range(256): buf = ctypes.create_unicode_buffer(2) ret = MultiByteToWideChar( codepage, 0, bytes([i]), 1, buf, 2) assert ret == 1, "invalid code page" assert buf[1] == '\x00' try: name = unicodedata.name(buf[0]) except ValueError: try: name = enc2uni[i][1] except KeyError: name = '' enc2uni[i] = (ord(buf[0]), name) return enc2uni def genwincodec(codepage): import platform map = genwinmap(codepage) encodingname = 'cp%d' % codepage code = codegen("", map, encodingname) # Replace first lines with our own docstring code = '''\ """Python Character Mapping Codec %s generated on Windows: %s with the command: python Tools/unicode/genwincodec.py %s """#" ''' % (encodingname, ' '.join(platform.win32_ver()), codepage ) + code.split('"""#"', 1)[1] print(code) if __name__ == '__main__': import sys genwincodec(int(sys.argv[1]))