Checked against the Hunspell 1.7 command line:
- Without a tab or a morphological field the whole line is the entry, so
a phrase with single-byte flags (tök jó/396 in hu_HU) no longer fails
the load or loses its alias; leading blanks belong to the entry.
- With an AF table a flag field is the alias its leading digits number
(fal/2x is alias 2, lab/b has none); an undefined alias, in a .dic
entry or a continuation class, reads as no flags instead of failing
the dictionary; a table without its count line is ignored.
- A REP count line may carry a comment, like AF and ICONV.
normalize copies the input only from its first change on, and SET and
FLAG are found in one pass over the .aff.
Checked against the Hunspell 1.7 command line:
- The first AF and ICONV line is the count even with a trailing comment
(AF 2 # aliases), so alias numbers no longer shift and ICONV 1 # no
longer turns 1 into #.
- A .dic entry ends where Hunspell ends it (dic_entry_end), so ad hoc/B
is one entry and ad alone is no word.
- An undefined alias in a .dic entry reads as no flags: the stem loads
without affixes instead of failing the whole dictionary.
- IGNORE characters are removed from the appended text only; a stripped
text that holds one never matches a stem, as in Hunspell.
- FLAG UTF-8 and SET are found anywhere in the .aff, not only in the
first 8 KB.
Also: normalize borrows the input when no conversion or ignored character
applies, the UTF-8 .aff reader counts fields as it goes and builds its
error context only on error, and the single-byte flag reader is
decode_latin1.
Without FLAG UTF-8, Hunspell reads a field that names one flag (PFX/SFX,
KEEPCASE, FORBIDDENWORD and the like) through decode_flag, which takes its
first byte: SFX é is the flag 0xC3. Such a field no longer fails the load.
SYLLABLENUM lists flags and is read byte by byte like AF. SET and FLAG
read only their first argument, so FLAG UTF-8 with a trailing comment
keeps Unicode flags.
The Hungarian Hunspell dictionary declares SET UTF-8 but writes its flags as single bytes, uses AF aliases and 158 distinct flags. Read flag fields byte by byte unless FLAG UTF-8 is set, expand AF aliases, skip AM, apply ICONV and IGNORE, honour KEEPCASE, and widen flag masks to 256 bits. Compounding and NEEDAFFIX stay unsupported for now.