On Mon, Jul 24, 2006 at 03:57:25PM -0700, Pm wrote:
> Found this bug while doing stuff --without-icu today...
> 
> Concatenation of a unicode string with an ASCII string
> works even if ICU isn't available.
> 
> Concatenation of a unicode string with a Unicode string
> works even if ICU isn't available.
> 
> Concatenation of a unicode string with an iso-8859-1 string
> fails with "no ICU lib loaded" if ICU isn't available.

On a possibly related note: for systems that *do* have ICU,
concatenating a unicode: string with an ascii:  or unicode: 
string appears to result in a different encoding than concatenating
with iso-8859-1.  Thus:

        $S0 = unicode:"A"
        $S1 = ascii:"B"
        $S2 = concat $S0, $S1
        print $S2                    # outputs "AB"
   
        $S0 = unicode:"A"
        $S1 = unicode:"B"
        $S2 = concat $S0, $S1
        print $S2                    # outputs "AB"

        $S0 = unicode:"A"
        $S1 = iso-8859-1:"B"
        $S2 = concat $S0, $S1
        print $S2                    # outputs "A\x00B\x00"

This particular behavior isn't necessarily a bug, but it is
at least somewhat unexpected.

Pm

Reply via email to