t-tk / upmendex-package

Source/Document distribution of upmendex --- multilingual index processor
Other
5 stars 1 forks source link

icu_attributes parsing issues #6

Closed FrankMittelbach closed 3 years ago

FrankMittelbach commented 3 years ago

When you mistype an attribute, e.g.

icu_attributes "strength:funny"

you get this output:

Warning: Illegal input for icu_attributes (strength).This is upmendex version 0.54 (TeX Live 2021).
Scanning dictionary file ./xx.dic....done.
Scanning input file err.idx....done (3 entries accepted, 0 rejected).
3 entries accepted, 0 rejected.

So this error detected (though the warning comes it bit early even before the programing announcing itself). However,

icu_attributes "Xstrength:funny"

gives exactly the same warning, and worse perhaps

icu_attributes "strngth:primary"

(missing "e") give no warning but the setting is obviously not carried out.

t-tk commented 3 years ago

I think new one improves output logs. r60350, r60351

input ist:

icu_attributes "strength:funny  Xstrength:funny  strngth:primary  strength:primaryQ  case-first:upper-first     numeric-ordering:on  "

log file ilg:

This is upmendex version 0.58 [ICU 68.2] (TeX Live 2022/dev).
Scanning style file ../../../source/texk/upmendex/tests/uni.ist....done.
Scanning style file ../../../source/texk/upmendex/tests/attr1.ist....done.

Warning: Illegal input for icu_attributes (strength:funny).
Warning: Illegal input for icu_attributes (Xstrength:funny).
Warning: Illegal input for icu_attributes (strngth:primary).
Warning: Illegal input for icu_attributes (strength:primaryQ).Scanning input file ../../../source/texk/upmendex/tests/rule.idx....done (16 entries accepted, 1 rejected).
16 entries accepted, 1 rejected.
FrankMittelbach commented 3 years ago

yes, this looks great and identifies both errors in the key as well as in the value, thanks. So all it needs is to show up at some point in TL :-).

Minor niggle: Some warnings like the above use Warning: ... but you also have (or had in 0.54)

Warning, [ICU] U_USING_DEFAULT_WARNING for locale %s
Warning, [ICU] U_USING_FALLBACK_WARNING for locale %s
Warning, [ICU] Failed to set attribute (%d): %s

i.e. using a , not a colon after the word Warning.

t-tk commented 3 years ago

About Warning,, I committed TeX Live svn r60419.

Thank you.