fix: reject unsupported SKK expressions
This commit is contained in:
@@ -32,9 +32,9 @@ the normal build image.
|
||||
|
||||
`skk2ktrans` accepts one or more EUC-JP SKK files (or standard input), writes
|
||||
UTF-8 tab-separated rows, and merges input in command-line and source order.
|
||||
It strips annotations, deduplicates candidates, and omits expressions and
|
||||
candidates containing whitespace. Escaped candidate delimiters are rejected;
|
||||
rewrite or omit those entries before import.
|
||||
It strips annotations, deduplicates candidates, and omits candidates containing
|
||||
whitespace. Rows containing expressions or escaped candidate delimiters are
|
||||
rejected; rewrite or omit those rows before import.
|
||||
|
||||
`verifymap.py` checks UTF-8, row structure, unique keys, 64-rune keys and
|
||||
values, canonical candidate spacing, and duplicate dictionary candidates.
|
||||
|
||||
@@ -34,6 +34,8 @@ function add(k, v, id) {
|
||||
fail("invalid row")
|
||||
if(field ~ /\\/)
|
||||
fail("escaped candidates are unsupported")
|
||||
if(field ~ /\/[([#]/)
|
||||
fail("expression candidates are unsupported")
|
||||
n = split(substr(field, 2, length(field)-2), value, "/")
|
||||
for(i = 1; i <= n; i++)
|
||||
add(key, value[i])
|
||||
|
||||
Reference in New Issue
Block a user