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

Re: PATCH: multibyte configuration



On Fri, Jan 06, 2006 at 11:33:06AM +0000, Peter Stephenson wrote:

> Danek Duvall tried out a simplified test for multibyte handling on
> Solaris which wasn't working for me, but it was for him, so I still have
> no clue what's happening there.  Any reports of working zsh with
> --enable-multibyte (and real multibyte characters, I know that at least
> it compiles and runs) on Solaris 8+ would be useful.

I'm working on Nevada (Solaris 11) build 25, using the Sun Studio 10
compiler, building -dev-2 plus the patch in 22124 (though I haven't tested
that functionality yet, so it probably doesn't matter).

For the purposes of this message, working is defined as

  - being able to insert a multibyte character onto the commandline with
    insert-composed-character

  - echo a string of such characters into a file named with such
    characters, via "echo <string> > <string>"

  - verify with ls that the file was created with the correct name

  - verify with cat the file contents are correct

I can confirm that simply with --enable-multibyte, it does *not* work.  In
particular, attempting to use insert-composed-char, I get

    insert-composed-char:1: cannot do charset conversion

The screen is also a litle wonky.  The error message above is on the
command-line I was trying to insert the composed character into (at the
position where the cursor was), and the "execute: insert-..." line is still
present below it, but with my cursor where it would be if the prompt had
been printed and the line as it was before I started the enterprise.

I've confirmed that this message (there are three identical ones) is the
third of the three -- which should never have happened.  It seems that all
the autoconf symbols in that cluster of ifdefs is defined -- HAVE_WCHAR_H,
HAVE_WCTOMB, HAVE_NL_LANGINFO and HAVE_ICONV, but what's missing is CODESET
(and apparently __STDC_ISO_10646__ which I believe *should* be defined, but
I haven't investigated why yet).

Compiling utils.c with cc -H, I notice that langinfo.h is never included.
I don't know why that is, and Peter, you'd probably be better than I in
tracking down the maze of ifdefs that control that.  But when I add

    #include <langinfo.h>
    #include <iconv.h>

after the other #includes in utils.c, it compiles successfully.  Actually,
it doesn't, but for unrelated reasons -- I have to #undef
HAVE_VARIABLE_LENGTH_ARRAYS in config.h, which autoconf correctly sets
because of its test, but something about the way that outstr in wcsiword()
is defined doesn't allow it to be dereferenced.

Once those changes are made, it works, as defined above.

Tomorrow, I'll give it a shot on S10 and S9, and maybe try to track down
the auxiliary issues.

Thanks,
Danek



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