I've noticed that language and country codes given by MLU functions are backwards. When querying an ICC file containing "enUS" locale, I get "ne" language and "SU" country.
Here's a program to reproduce: #include <lcms2.h> #include <stdio.h> int main() { cmsHPROFILE p = cmsOpenProfileFromFile("/Library/ColorSync/Profiles/WebSafeColors.icc", "r"); // This profile is standard on OS X and I've verified with hexdump that locales are in a normal byte order cmsMLU *mlu = cmsReadTag(p, cmsSigProfileDescriptionMLTag); int cnt = cmsMLUtranslationsCount(mlu); for(int i=0; i < cnt; i++) { char lang[3] = {0}; char country[3] = {0}; cmsMLUtranslationsCodes(mlu, i, lang, country); printf("%s %s\n", lang, country); } } It outputs: ks KS ne SU ac SE iv NV tp RB ku AU rf UF uh UH hz WT bn ON ok RK sc ZC eh LI or OR ed ED ti TI vs ES hz NC aj PJ le RG tp OP ln LN se SE ht HT rt RT if IF rh RH lp LP ur UR ra GE ad KD ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user