zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: multibyte FAQ (MacOS X)
Date: Sun, 18 Dec 2005 19:41:07 +0000	[thread overview]
Message-ID: <200512181941.jBIJf8Ci004603@pwslaptop.csr.com> (raw)
In-Reply-To: Your message of "Sun, 18 Dec 2005 23:14:19 +0900." <a06001000bfcb1deaed2f@kba.biglobe.ne.jp>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4269 bytes --]

"Jun T." wrote:
> In MacOS X, configure does not enable multibyte by default, because __STDC_IS
> O_10646__ is not defined. So "./configure; make" gives a zsh without multibyt
> e support, although it supports "\u....".

Thanks, this is useful.

> (1) "\u...." (and so insert-composed-char and insert-unicode-char) doesn't wo
> rk. This can be fixed by a patch proposed in 22085.

That's now committed.

> (2) In MacOS X, the standard file system is HFS+ which stores filenames in Un
> icode but in fully decomposed form. This means the filename returned by the c
> ompletion is also in decomposed form; the filename is displayed correctly, bu
> t it can't be edited correctly. And if I go up/down in the history stack the 
> prompt is destroyed.

I don't know anything about this, so if anyone else is able to do
something about it, splendid.

With some suggestions about xterm from Phil Pennock together with
looking through the manual, and an attempt on the Sourceforge compile
farm, I now have the following.  FreeBSD was offline; NetBSD worked with
--enable-multibyte; OpenBSD doesn't have wcswidth() so doesn't compile
with --enable-multibyte, though presumably a few configure tests ought to
help matters.

I've still had no luck with Solaris, even Solaris 9.  It didn't help
that the only UTF-8 locale around was ru_RU.UTF-8, but that isn't the
basic problem and I don't know what is; it seems that even obvious
multibyte strings like accented Latin characters aren't being
recognised, even though all the functions are present, the terminal
works fine with other multibyte systems, and LANG is set correctly.

Index: INSTALL
===================================================================
RCS file: /cvsroot/zsh/zsh/INSTALL,v
retrieving revision 1.22
diff -u -r1.22 INSTALL
--- INSTALL	15 Dec 2005 10:38:55 -0000	1.22
+++ INSTALL	18 Dec 2005 19:32:01 -0000
@@ -276,12 +276,14 @@
 multibyte mode is believed to work automatically on:
 
   - All(?) current GNU/Linux distributions
-  - All(?) current BSD variants
-  - OS X 10.4.3
 
 and to work when configured with --enable-multibyte on:
 
-  - Solaris 8 and later
+  - OS X 10.4.3 (problems have been reported with multibyte characters
+    in HFS file names)
+  - NetBSD 2.0.2
+
+Any help with Solaris 8 or 9 would be appreciated.
 
 The main shell is not yet aware of multibyte characters, so for example the
 length of a scalar parameter will return the number of bytes, not
Index: Etc/FAQ.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Etc/FAQ.yo,v
retrieving revision 1.29
diff -u -r1.29 FAQ.yo
--- Etc/FAQ.yo	15 Dec 2005 10:38:56 -0000	1.29
+++ Etc/FAQ.yo	18 Dec 2005 19:32:05 -0000
@@ -2071,7 +2071,25 @@
    it() The terminal emulator.  Those that are supplied with a recent
       desktop environment, such as gnome-terminal, are likely to have
       extensive support for localization and may work correctly as soon
-      as they know the locale.
+      as they know the locale.  You can enable UTF-8 support for
+      tt(xterm) in its application defaults file.  The following are
+      the relevant resources; you donʼt actually need all of them, as
+      described below.  If you use a mytt(~/.Xdefaults) or
+      mytt(~/.Xresources) file for setting resources, prefix all the lines
+      with mytt(xterm):
+      verb(
+        *wideChars: true
+        *locale: true
+        *utf8: 1
+        *vt100Graphics: true
+      )
+      This turns on support for wide characters (this is enabled by the
+      tt(utf8) resource, too); enables conversions to UTF-8 from other
+      locales (this is the key resource and actually overrides
+      mytt(utf8)); turns on UTF-8 mode (this resource is mostly used to
+      force use of UTF-8 characters if your locale system isnʼt up to it);
+      and allows certain graphic characters to work even with UTF-8
+      enabled.  (Thanks to Phil Pennock for suggestions.)
    it() The font.  If you selected this from a menu in your terminal
       emulator, there's a good chance it already selected the right
       character set to go with it.  If you hand-picked an old fashioned

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page still at http://www.pwstephenson.fsnet.co.uk/


  parent reply	other threads:[~2005-12-18 19:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-14 18:31 PATCH: multibyte FAQ Peter Stephenson
2005-12-14 18:41 ` Peter Stephenson
2005-12-15 14:42   ` Peter Stephenson
2005-12-14 19:25 ` [22076] " Danek Duvall
2005-12-14 21:09   ` Peter Stephenson
2005-12-16  9:39     ` Danek Duvall
2005-12-16 17:13       ` Bart Schaefer
2005-12-18 19:38         ` Danek Duvall
2005-12-18 21:10           ` Bart Schaefer
2005-12-18 14:14 ` PATCH: multibyte FAQ (MacOS X) Jun T.
2005-12-18 15:26   ` Andrey Borzenkov
2005-12-19  9:08     ` Jun T.
2005-12-18 19:41   ` Peter Stephenson [this message]
2005-12-21 16:15     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200512181941.jBIJf8Ci004603@pwslaptop.csr.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).