From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27098 invoked from network); 9 Jan 2005 03:34:02 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Jan 2005 03:34:02 -0000 Received: (qmail 39813 invoked from network); 9 Jan 2005 03:33:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jan 2005 03:33:56 -0000 Received: (qmail 74 invoked by alias); 9 Jan 2005 03:33:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20653 Received: (qmail 60 invoked from network); 9 Jan 2005 03:33:40 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Jan 2005 03:33:40 -0000 Received: (qmail 39505 invoked from network); 9 Jan 2005 03:33:40 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 9 Jan 2005 03:33:36 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 3340D7004A; Sat, 8 Jan 2005 22:33:35 -0500 (EST) Date: Sat, 8 Jan 2005 22:33:35 -0500 From: Clint Adams To: zsh-workers@sunsite.dk Subject: UTF-8 FAQs Message-ID: <20050109033335.GA18994@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 The number of questions I've been getting about zsh and UTF-8 have skyrocketed over the past couple of weeks. Perhaps some of these belong in the zsh FAQ. Corrections to my stock answers are welcome. Q: Does zsh support UTF-8? A: zsh's built-in printf command supports "\u" and "\U" escapes to output arbitrary Unicode characters. ZLE (the Zsh Line Editor) has no concept of character encodings, and is confused by multi-octet encodings. Q: Why doesn't zsh have proper UTF-8 support? A: The code has not been written yet. Q: What makes UTF-8 support difficult to implement? A: In order to handle arbitrary encodings the correct way, significant and intrusive changes must be made to the shell. Q: Why can't zsh just use readline? A: ZLE is not encapsulated from the rest of the shell. Isolating it such that it could be replaced by readline would be a significant effort. Furthermore, using readline would effect a significant loss of features. Q: How can I help implement UTF-8 support in zsh? A: One approach would be to have ZLE use wide characters internally. Character based widgets could then operate on a single wide character instead of a single byte, and the proper display width can be calculated with wcswidth().