Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Failed tests of zsh 4.3.5 in Solaris 10 w/Sun Studio 12 CC



On Tue, 26 Feb 2008 14:18:14 +0100
Dagobert Michelsen <dam@xxxxxxxxxxxxx> wrote:
> I am building zsh 4.3.5 on Solaris 10 x86 with the
> Sun Studio 12 compiler and I have some failed tests
> in the teststuite:
>...
> ./A03quoting.ztst: starting.
> Test ./A03quoting.ztst failed: bad status 1, expected 0 from:
>    print '<\u0041>'
>    printf '%s\n' $'<\u0042>'
>    print '<\u0043>'
>    printf '%s\n' $'<\u0044>'
> Error output:
> (eval):1: cannot do charset conversion
>...
> ./D07multibyte.ztst: starting.
> Testing multibyte with locale en_US.UTF-8
> *** /tmp/zsh.ztst.out.19793     Tue Feb 26 08:06:28 2008
> --- /tmp/zsh.ztst.tout.19793    Tue Feb 26 08:06:28 2008
> ***************
> *** 1,4 ****
> ! OK
> ! OK
> ! OK
> ! OK
> --- 1,4 ----
> ! Failed: no error message and no question mark
> ! Failed: no error message and no question mark
> ! Failed: no error message and no question mark
> ! Failed: no error message and no question mark
> Test ./D07multibyte.ztst failed: output differs from expected as  

This means the it hasn't found either iconv or any other library to do
character conversion.  (The error message is suppressed in the second case
but there's a good chance it's the same error.)  The shell has two basic
ways of doing this:

(i) compile environment directly supports ISO 10646
(ii) libraries support nl_langinfo(CODESET) and
     (a) the current locale uses UTF-8 so the shell
         can do a trivial conversion to UTF-8.
     (b) iconv() is available in -liconv.

(i) or (ii) are handled at compile time.  The choice between (ii)(a) and
(ii)(b) is handled at run time so long as nl_langinfo(CODESET) is
available.  I don't think (ii)(a) applies in these tests, so this
presumably means both that the environment doesn't support ISO 10646, and
that iconv wasn't found.

It might for developers' purposes (this doesn't affect you directly except
as far as bug reports go) be useful to distinguish what failed...

Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.176
diff -u -r1.176 utils.c
--- Src/utils.c	25 Jan 2008 16:48:23 -0000	1.176
+++ Src/utils.c	26 Feb 2008 14:09:43 -0000
@@ -4877,7 +4877,7 @@
 
     	    	    cd = iconv_open(nl_langinfo(CODESET), "UCS-4BE");
 		    if (cd == (iconv_t)-1) {
-			zerr("cannot do charset conversion");
+			zerr("cannot do charset conversion (iconv failed)");
 			CHARSET_FAILED();
 		    }
                     count = iconv(cd, &inptr, &inbytes, &t, &outbytes);
@@ -4889,12 +4889,12 @@
 		    if ((how & GETKEY_UPDATE_OFFSET) && s - sstart < *misc)
 			(*misc) += count;
 #   else
-                    zerr("cannot do charset conversion");
+                    zerr("cannot do charset conversion (iconv not available)");
 		    CHARSET_FAILED();
 #   endif
 		}
 #  else
-                zerr("cannot do charset conversion");
+                zerr("cannot do charset conversion (NLS not supported)");
 		CHARSET_FAILED();
 #  endif
 # endif



Messages sorted by: Reverse Date, Date, Thread, Author