Marti,

in cmsio1.c:1507 lcms bails out if wcstombs returns with -1, as is the 
case for the mentioned profile.

I tested on x86 linux with libc-2.5. In return of ReadEmbeddedTextTag the 
strlen is zero. Probably the glibc implementation is weak, and lcms needs 
a work around to wcstombs.

something like (?):

1504             i = wcstombs(Name, wchar, size_max );  
1505             if (i == ((size_t) -1)) {
1506                 // second try at least for latin
1507                 int i;
1508                 char *tmp = (char*)wchar;
1509                 for(i = 0; i < Len/2; ++i)
1510                   Name[i] = tmp[i*2];
1511                 //Name[0] = 0;    // Error
1512             }

A check to ignore multibyte characters would be needed in addition:

/*
 * Index into the table below with the first byte of a UTF-8 sequence to
 * get the number of trailing bytes that are supposed to follow it.
 * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is
 * left as-is for anyone who may want to do such conversion, which was
 * allowed in earlier algorithms.
 */
static const char trailingBytesForUTF8[256] = {
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
};

If a multibyte character is found the whole language selection can fall 
back to english.


Would it make it?

kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org + www.cinepaint.org


Am 15.09.07, 15:37 +0200 schrieb Marti Maria:

> $ icctrans -i /cygdrive/f/sRGB_v4_ICC_preference.icc -v
> LittleCMS ColorSpace conversion calculator - v3.0
> 
> From: sRGB v4 ICC preference perceptual intent beta
> Desc: sRGB v4 ICC preference perceptual intent beta
> Info: sRGB v4 ICC preference perceptual intent beta
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to