zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: "Zsh Hackers' List" <zsh-workers@sunsite.dk>
Subject: Re: PATCH: (large) initial support for combining characters in ZLE.
Date: Mon, 14 Apr 2008 13:00:56 +0100	[thread overview]
Message-ID: <20080414130056.48b8e05a@news01> (raw)
In-Reply-To: <20080413175442.0e95a241@pws-pc>

Documention changes, some of them somewhat overdue.

I wonder if it's time to merge the FAQ into the main documentation as
zshfaq.1?

Index: Doc/Zsh/roadmap.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/roadmap.yo,v
retrieving revision 1.10
diff -u -r1.10 roadmap.yo
--- Doc/Zsh/roadmap.yo	1 Feb 2008 19:59:48 -0000	1.10
+++ Doc/Zsh/roadmap.yo	14 Apr 2008 11:50:10 -0000
@@ -44,6 +44,13 @@
 tt(HISTSIZE) and tt(SAVEHIST) in ifzman(zmanref(zshparam))\
 ifnzman(noderef(Parameters Used By The Shell)).
 
+The shell now supports the UTF-8 character set (and also others if
+supported by the operating system).  This is (mostly) handled transparently
+by the shell, but the degree of support in terminal emulators is variable.
+There is some discussion of this in the shell FAQ,
+http://zsh.dotsrc.org/FAQ/ .  Note in particular that for combining
+characters to be handled the option tt(COMBINING_CHARS) needs to be set.
+
 subsect(Completion)
 
 Completion is a feature present in many shells. It allows the user to
Index: Etc/FAQ.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Etc/FAQ.yo,v
retrieving revision 1.37
diff -u -r1.37 FAQ.yo
--- Etc/FAQ.yo	31 Mar 2008 15:03:11 -0000	1.37
+++ Etc/FAQ.yo	14 Apr 2008 11:50:14 -0000
@@ -126,11 +126,11 @@
 4.5. How do I get started with programmable completion?
 4.6. Suppose I want to complete all files during a special completion?
 
-Chapter 5:  Multibyte input
+Chapter 5:  Multibyte input and output
 
 5.1. What is multibyte input?
-5.2. How does zsh handle multibyte input?
-5.3. How do I ensure multibyte input works on my system?
+5.2. How does zsh handle multibyte input and output?
+5.3. How do I ensure multibyte input and output work on my system?
 5.4. How can I input characters that aren't on my keyboard?
 
 Chapter 6:  The future of zsh
@@ -1961,7 +1961,7 @@
   such as expansion or approximate completion.
 
 
-chapter(Multibyte input)
+chapter(Multibyte input and output)
 label(c5)
 
 sect(What is multibyte input?)
@@ -2012,7 +2012,7 @@
   in those formats.)
 
 
-sect(How does zsh handle multibyte input?)
+sect(How does zsh handle multibyte input and output?)
 
   Until version 4.3, zsh didn't handle multibyte input properly at all.
   Each octet in a multibyte character would look to the shell like a
@@ -2021,50 +2021,44 @@
   cause all sorts of odd effects.  (It was possible to edit in zsh using
   single-byte extensions of ASCII such as the ISO 8859 family, however.)
 
-  From version 4.3, multibyte input is handled in the line editor if zsh
-  has been compiled with the appropriate definitions.  This will happen
-  automatically if the compiler defines __STDC_ISO_10646__, which is true
-  for many recent GNU-based systems.  On other systems you must configure
-  zsh with the argument --enable-multibyte to configure.  Explicit use of
-  --enable-multibyte should work on many other recent UNIX systems; if it
-  works on yours, and that's not mentioned in the shell documentation,
-  please report this to zsh-workers@sunsite.dk, and if it doesn't but you
-  can work out why not we'd also be interested in hearing.
-
-  (The reason for the test for __STDC_ISO_10646__ is that its presence
-  happens to indicate that the required library support is likely to be
-  present, short-circuiting a large number of configuration tests.  This
-  isn't strictly guaranteed, since the definition indicates the rather more
-  limited fact that the wide character representation used internally by
-  the shell is Unicode.  However, in practice such systems provide the
-  right level of support for zsh to use.  It would be better to test
-  individually for the library features the shell needs; unfortunately
-  there are a lot of them.)
-
-  You can test if multibyte handling is compiled into your version of the
-  shell by running:
-  verb(
-    (bindkey -m)
-  )
-  which should output a warning:
-  verb(
-    bindkey: warning: `bindkey -m' disables multibyte support
-  )
-  If it doesn't, you don't have multibyte support in your shell.  The
-  parentheses are there to run the command in a subshell, which protects
-  your interactive shell from the effects being warned about.
-
-  Multibyte strings are not yet handled anywhere else in the shell.  This
-  means, for example, patterns treat multibyte characters as a set of single
-  octets and the ${#var} syntax counts octets, not characters.  There will
-  probably be new syntax to ensure that zsh can work both in its traditional
-  way as well as when interpreting multibyte characters.
+  From version 4.3.4, multibyte input is handled in the line editor if zsh
+  has been compiled with the appropriate definitions, and is automatically
+  activated.  This is indicated by the option tt(MULTIBYTE), which is
+  set by default on shells that support multibyte mode.  Hence you
+  can test this with a standard option test:  `tt([[ -o multibyte ]])'.
+
+  The tt(MULTIBYTE) option affects the entire shell: parameter expansion,
+  pattern matching, etc. count valid multibyte character strings as a
+  single character.  You can unset the option locally in a function to
+  revert to single-byte operation.
+
+  Note that if the shell is emulating a Bourne shell the tt(MULTIBYTE)
+  option is unset by default.  This allows various POSIX modes to
+  work normally (POSIX does not deal with multibyte characters).  If
+  you use a "sh" or "ksh" emulation interactively you shouldprobably
+  set the tt(MULTIBYTE) option.
+
+  The other option that affects multibyte support is tt(COMBINING_CHARS),
+  new in version 4.3.7.  When this is set, any zero-length punctuation
+  characters that follow an alphanumeric character (the base character) are
+  assumed to be modifications (accents etc.) to the base character and to
+  be displayed within the same screen area as the base character.  As not
+  all terminals handle this, even if they correctly display the base
+  multibyte character, this option is not on by default.  The KDE terminal
+  emulator tt(konsole) is known to handle combining characters.
+
+  The tt(COMBINING_CHARS) option only affects output; combining characters
+  may always be input, but when the option is off will be displayed
+  specially.  By default this is as a code point (the index of the
+  character in the character set) between angle brackets, usually
+  in inverse video.  Highlighting of such special characters can
+  be modified using the new array parameter tt(zle_highlight).
 
 
-sect(How do I ensure multibyte input works on my system?)
+sect(How do I ensure multibyte input and output work on my system?)
 
   Once you have a version of zsh with multibyte support, you need to
-  ensure the envivronment is correct.  We'll assume you're using UTF-8.
+  ensure the environment is correct.  We'll assume you're using UTF-8.
   Many modern systems may come set up correctly already.  Try one of
   the editing widgets described in the next section to see.
 
@@ -2163,6 +2157,9 @@
   however, using UTF-8 massively extends the number of valid characters
   that can be produced.
 
+  See also url(http://www.cl.cam.ac.uk/~mgk25/unicode.html#input)http://www.cl.cam.ac.uk/~mgk25/unicode.html#input)
+  for general information on entering Unicode characters from a keyboard.
+
 
 chapter(The future of zsh)
 


  parent reply	other threads:[~2008-04-14 12:49 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13 16:54 Peter Stephenson
2008-04-13 17:32 ` Bart Schaefer
2008-04-14  9:02   ` Peter Stephenson
2008-04-14 12:00 ` Peter Stephenson [this message]
2008-04-14 13:34 ` Mikael Magnusson
2008-04-14 13:54   ` Peter Stephenson
2008-04-15 13:58     ` Mikael Magnusson
2008-04-15 16:46       ` Peter Stephenson
2008-04-16  1:28         ` Mikael Magnusson
2008-04-16  8:47           ` Peter Stephenson
2008-04-17  9:28             ` Stephane Chazelas
2008-09-22 18:16             ` Mikael Magnusson
2008-09-22 18:36               ` Peter Stephenson
2008-09-22 18:39                 ` Mikael Magnusson
2008-04-17 18:33 ` Jun T.
2008-04-18  9:40   ` Peter Stephenson
2008-04-18 15:48     ` Jun T.
2008-04-18 16:05       ` Peter Stephenson
2008-04-19 15:04         ` Jun T.
2008-05-04  0:52 Identify "active" region? Bart Schaefer
2008-05-04  7:16 ` Mikael Magnusson
2008-05-04 12:21 ` Peter Stephenson
2008-05-04 12:33   ` Mikael Magnusson
2008-05-04 12:35     ` Mikael Magnusson
2008-05-04 13:28       ` Mikael Magnusson
2008-05-04 18:05         ` Peter Stephenson
2008-05-04 19:10           ` Mikael Magnusson
2008-05-04 16:38       ` Bart Schaefer
2008-05-04 17:52         ` Mikael Magnusson
     [not found] <okiddle@yahoo.co.uk>
2008-10-30 21:20 ` another bug: zsh_directory_name Oliver Kiddle
2008-10-30 21:26   ` Mikael Magnusson
2008-10-30 22:13     ` Peter Stephenson
2008-10-30 23:44       ` Vincent Lefevre
2008-10-31  0:14       ` Mikael Magnusson
2008-10-31  9:44       ` Oliver Kiddle
2008-10-31  9:58         ` Peter Stephenson
2008-10-30 22:16   ` Peter Stephenson
2008-10-31 11:10 ` PATCH: bug with hash builtin Oliver Kiddle
2008-10-31 21:07   ` Peter Stephenson
2008-12-16 15:38 PATCH: edit-command-line with spaces in EDITOR Clint Adams
2008-12-16 17:07 ` Mikael Magnusson
2008-12-16 19:22   ` Peter Stephenson
2008-12-16 19:27   ` Mikael Magnusson
2008-12-16 20:51     ` Richard Hartmann
2008-12-16 21:45   ` Clint Adams
2008-12-16 22:31     ` Mikael Magnusson
2008-12-17 12:16       ` Romain Francoise
     [not found]         ` <237967ef0812170448n11bd34f8y2c98b6484c8c0024@mail.gmail.com>
     [not found]           ` <87oczb9d1j.fsf@elegiac.orebokech.com>
2008-12-17 13:17             ` Mikael Magnusson
2008-12-17 14:44         ` Greg Klanderman
2008-12-17  4:04     ` Bart Schaefer
2009-10-30 16:10 zsh eats 100% CPU with completion in / Frank Terbeck
2009-10-30 21:14 ` Mikael Magnusson
2009-10-30 21:25   ` Mikael Magnusson
2009-10-30 21:33   ` Mikael Magnusson
2009-10-31 20:00     ` Peter Stephenson
2009-10-31 22:43       ` Mikael Magnusson
2009-10-31 23:00         ` Peter Stephenson
2009-11-01  1:50           ` Mikael Magnusson
2009-11-01 18:31             ` Peter Stephenson
2009-11-01 19:33               ` Bart Schaefer
2009-11-01 21:12               ` Mikael Magnusson
2009-11-01 22:20                 ` Peter Stephenson
2009-11-02  0:57                   ` Mikael Magnusson
2009-11-02  1:26                     ` Mikael Magnusson
2009-11-02 16:38                       ` Peter Stephenson
2009-11-02 20:58                         ` Mikael Magnusson
2009-11-02 21:06                           ` Mikael Magnusson
2009-11-02 21:30                             ` Mikael Magnusson
2009-11-03 10:10                               ` Peter Stephenson
2009-11-03 11:24                                 ` Frank Terbeck
2009-11-02 10:06                     ` Peter Stephenson
2009-10-30 21:29 ` Benjamin R. Haskell
2009-10-30 23:01   ` Frank Terbeck
2009-10-30 23:15     ` Frank Terbeck
2009-12-04 21:53 Add completion suffix highlighting Mikael Magnusson
2009-12-04 22:00 ` Mikael Magnusson
2009-12-05 19:31 ` Peter Stephenson
2009-12-05 19:36   ` Peter Stephenson
2009-12-05 19:49   ` Mikael Magnusson
2009-12-05 20:11     ` Peter Stephenson
     [not found] <mikachu@gmail.com>
2008-02-06 15:02 ` Completion lockup Mikael Magnusson
2008-02-06 15:07   ` Ismail Dönmez
2008-02-09 17:21   ` Peter Stephenson
2008-02-09 18:04     ` Mikael Magnusson
2008-02-09 19:13       ` Peter Stephenson
2008-08-30 12:02 ` Who is sorting my completion results? Mikael Magnusson
2008-08-30 12:16   ` Peter Stephenson
2008-08-30 12:39     ` Mikael Magnusson
     [not found] ` <237967ef0902140622s7389d2c8h5a0c786dcf207422@mail.gmail.com>
     [not found]   ` <200902141801.n1EI1E2l003603@pws-pc.ntlworld.com>
     [not found]     ` <237967ef0902141019t30118690m30116c9413015d96@mail.gmail.com>
     [not found]       ` <090214111316.ZM15188@torch.brasslantern.com>
     [not found]         ` <237967ef0902141141y609b61d3i154546f6f6886c65@mail.gmail.com>
     [not found]           ` <090214133904.ZM15383@torch.brasslantern.com>
     [not found]             ` <20090216094632.30502fe9@news01>
2009-02-16  9:55               ` Problem with fake-files style and cd Mikael Magnusson
2011-05-27  1:25                 ` Mikael Magnusson
2011-05-27  4:41                   ` Bart Schaefer
2011-05-27  4:57                     ` Mikael Magnusson
2011-05-27  5:36                       ` Bart Schaefer
2011-05-27 14:24                         ` Mikael Magnusson
2011-05-27 14:39                           ` Peter Stephenson
2011-05-27 15:06                           ` Bart Schaefer
2011-05-27 15:16                             ` Mikael Magnusson
2011-05-27 15:44                               ` Bart Schaefer
2011-01-06 19:22 ` Infinite loop, can't reproduce with zsh -f Mikael Magnusson
2011-01-06 20:03   ` Peter Stephenson
2014-11-23 21:07 ` PATCH: Fix leaks of desthost in ztcp Mikael Magnusson
2014-11-23 21:53   ` 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=20080414130056.48b8e05a@news01 \
    --to=pws@csr.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).