fix: reject unsupported SKK expressions

This commit is contained in:
2026-08-12 17:39:09 +09:00
parent bae39c0188
commit 1f9af6ee3e
4 changed files with 13 additions and 4 deletions

View File

@@ -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.

View File

@@ -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])