summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-03-04 13:18:35 +0100
committerTyge Løvset <[email protected]>2022-03-04 13:18:35 +0100
commit3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60 (patch)
tree46975c8374107e44fd9605894ce5b02d981ba538 /src
parentc4301c6b492bb962a943335bf8df4920b2a699cf (diff)
downloadSTC-modified-3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60.tar.gz
STC-modified-3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60.zip
Updated printf formatting to portable code. This was also to use http://winlibs.com gcc+clang with ucrt runtime-libs without warnings.
Diffstat (limited to 'src')
-rw-r--r--src/casefold.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/casefold.py b/src/casefold.py
index 73d6fcbc..82d19853 100644
--- a/src/casefold.py
+++ b/src/casefold.py
@@ -2,7 +2,7 @@
import pandas as pd
import numpy as np
-def read_unidata(catfilter, casefilter=None, big=False):
+def read_unidata(catfilter='Lu', casefilter='lowcase', big=False):
ud = pd.read_csv("ucd/UnicodeData.txt", sep=';', converters={0: lambda x: int(x, base=16)},
names=['code', 'name', 'category', 'canclass', 'bidircat', 'chrdecomp',
'decdig', 'digval', 'numval', 'mirrored', 'uc1name', 'comment',
@@ -119,6 +119,7 @@ static struct CaseFold { uint16_t c0, c1, m1; } casefold[] = {''')
def make_casetable():
df = read_casefold()
+ #df = read_unidata()
letters = make_caselist(df)
cfold = make_casefold(letters)
return cfold