HKO changed calendar text file encoding from BIG5 to UTF8

This commit is contained in:
Wei Chen
2025-05-10 13:04:40 -05:00
parent 747a5e0a27
commit 6d9be1e46e

View File

@@ -125,7 +125,7 @@ def parse_hko(pageurl):
print('grabbing and parsing %s' % pageurl) print('grabbing and parsing %s' % pageurl)
with urllib.request.urlopen(pageurl) as f: with urllib.request.urlopen(pageurl) as f:
html = f.read() html = f.read()
lines = html.decode('big5').split('\n') lines = html.decode('utf-8').split('\n')
sql_nojq = ('insert or replace into ical (date,lunardate) ' sql_nojq = ('insert or replace into ical (date,lunardate) '
'values(?,?) ') 'values(?,?) ')