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

Re: PATCH: multibyte FAQ



Peter Stephenson <pws@xxxxxxx> wrote:
> Peter Stephenson <pws@xxxxxxx> wrote:
> > +and to work when configured with --enable-multibyte on:
> > +
> > +  - Solaris 8 and later
> 
> Hmm... not convinced any more.

This is still the case, but I've got slightly more idea about why behaviour
was poor with --multibyte-enable without assuming wchar_t was UCS-4.
We don't include langinfo.h if MULTIBYTE_SUPPORT is defined, which means
CODESET isn't defined, which means we don't use iconv.  (We had a report
about this a while back, I think from Zvi.)

It doesn't seem worth trying too hard to work out if we don't need
langinfo.h.  I'll apply the following patch and following Oliver's
suggestion back off the other one.

I'm still not getting the resulting multibyte strings handled properly in
Solaris.  I don't know why not or whether they should.  I had a vague
feeling this was basically working...

Index: Src/system.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/system.h,v
retrieving revision 1.35
diff -u -r1.35 system.h
--- Src/system.h	28 Oct 2005 17:34:33 -0000	1.35
+++ Src/system.h	15 Dec 2005 14:29:43 -0000
@@ -703,11 +703,10 @@
  */
 # include <wchar.h>
 # include <wctype.h>
-#else
-# ifdef HAVE_LANGINFO_H
-#   include <langinfo.h>
-#   ifdef HAVE_ICONV
-#     include <iconv.h>
-#   endif
-# endif
+#endif
+#ifdef HAVE_LANGINFO_H
+#  include <langinfo.h>
+#  ifdef HAVE_ICONV
+#    include <iconv.h>
+#  endif
 #endif

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



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