Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friulian locale trips up icc generation #121

Open
jtojnar opened this issue Nov 7, 2020 · 3 comments
Open

Friulian locale trips up icc generation #121

jtojnar opened this issue Nov 7, 2020 · 3 comments

Comments

@jtojnar
Copy link
Contributor

jtojnar commented Nov 7, 2020

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:

colord/lib/colord/cd-icc.c

Lines 1294 to 1300 in 4534c16

if (strlen (split[0]) != 2) {
g_set_error (error,
CD_ICC_ERROR,
CD_PROFILE_ERROR_FAILED_TO_PARSE,
"ignoring invalid country code: %s", split[0]);
return NULL;
}

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

@hughsie
Copy link
Owner

hughsie commented Nov 8, 2020

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?

@jtojnar
Copy link
Contributor Author

jtojnar commented Nov 8, 2020

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?

@hughsie
Copy link
Owner

hughsie commented Nov 8, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants