Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import defaultdict
- import pandas as pd
- urls = [r'https://www.fileformat.info/info/charset/Shift_JIS/list.htm',
- r'https://www.fileformat.info/info/charset/Shift_JIS/list.htm?start=1024',
- r'https://www.fileformat.info/info/charset/Shift_JIS/list.htm?start=2048',
- r'https://www.fileformat.info/info/charset/Shift_JIS/list.htm?start=3072',
- r'https://www.fileformat.info/info/charset/Shift_JIS/list.htm?start=4096',
- r'https://www.fileformat.info/info/charset/Shift_JIS/list.htm?start=5120',
- r'https://www.fileformat.info/info/charset/Shift_JIS/list.htm?start=6144'
- ]
- for url in urls:
- tables = pd.read_html(url, converters=defaultdict(lambda: str))
- characterTable = tables[0]
- characters = len(characterTable)
- i = 0
- while i < characters:
- print("[0x" + str(characterTable.loc[i]['Encoded Byte']) + ']="' + str(characterTable.loc[i]['Character']) + '", ')
- i += 1
Advertisement
Add Comment
Please, Sign In to add comment