colord icon indicating copy to clipboard operation
colord copied to clipboard

Friulian locale trips up icc generation

Open jtojnar opened this issue 5 years ago • 3 comments

During colord build, I have been getting the following warning:

[161/221] Generating x11-colors.icc with a custom commandne.so.p/cd-plugin-sane.c.o

(cd-create-profile:2036): libcolord-WARNING **: 10:29:01.777: failed to parse localized text Col?rs X11[fur]: ignoring invalid country code: fur

Looks like colord does not like the three letter language code for Friulian:

https://github.com/hughsie/colord/blob/4534c166c1f65fc0a032b2718a41571021ae88fb/lib/colord/cd-icc.c#L1294-L1300

It also weirdly calls it country code even though there is no country code (it would be in split[1]).

jtojnar avatar Nov 07 '20 10:11 jtojnar

IIRC, the ICC specification only allows a two character ISO 639-1 language code, and a two letter ISO 3166-1 country code. According to https://en.wikipedia.org/wiki/Friulian_language there's a ISO 639-2 and ISO 639-3 code, but no ISO 639-1 language code. Maybe I just skip fur?

hughsie avatar Nov 08 '20 16:11 hughsie

Looking at the specification, you are right – the struct only reserves 2 bytes for the language code. Since there are many languages without Alpha-2 code, would it make sense to report it to ICC so they can possibly address it in future versions of the spec?

jtojnar avatar Nov 08 '20 16:11 jtojnar

would it make sense to report it to ICC

It's certainly worth trying, but the ICC group has failed to convince everyone to upgrade to V4 from V2, so getting a V6 would be very hard work...

hughsie avatar Nov 08 '20 16:11 hughsie