zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
Cc: "Zsh Hackers' List" <zsh-workers@sunsite.dk>
Subject: Re: zsh 4.3.6 FreeBSD bug
Date: Mon, 5 May 2008 15:05:27 +0100	[thread overview]
Message-ID: <20080505150527.28261c46@pws-pc> (raw)
In-Reply-To: <20080505003858.GA90654@redoubt.spodhuis.org>

On Sun, 4 May 2008 17:38:58 -0700
Phil Pennock <zsh-workers+phil.pennock@spodhuis.org> wrote:
> Can anyone confirm if these problems, outlined below, are widely seen or
> a platform issue?
>
> Note the differences between EURO SIGN first and POUND SIGN first,
> perhaps something to do with character width:
> €: EURO SIGN    [0x20ac]
> £: POUND SIGN   [0xa3]

I haven't seen any problems with either of these two characters on
any of the Fedora versions I've been using.

> Is this the problem which wcwidth() should fix?

No, it looks like something different.  wcwidth() tells the shell the
printing width; it's nothing to do with the number of bytes that make up
the character.  The symptom of wcwidth() failing is that the character
prints OK but the shell doesn't count the characters it's moving over or
deleting properly.

What does the following give for you (with pound sterling followed by Euro)?

% echo £€ | xxd
0000000: c2a3 e282 ac0a                           ......

0xc2 0xa3 is the pound sign in UTF-8 and 0xe2 0x82 0xac is the Euro
symbol.  If it's the same as what I get, then the conversion to UTF-8 is
correct.  One possibility for what's going wrong is that 0xe2 0x82 0xac
is being reported as an invalid character by mbtowc() and its
relatives.  The shell's line editor would pick this up and show the
individual bytes; a dumb display would simply dump out the bytes and if
the terminal is working they would show up OK.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  parent reply	other threads:[~2008-05-05 14:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03  7:39 Phil Pennock
2008-05-04 12:08 ` Dag-Erling Smørgrav
2008-05-04 12:25   ` Dag-Erling Smørgrav
2008-05-05 22:02     ` Phil Pennock
2008-05-06  8:51       ` Peter Stephenson
2008-05-06 10:05         ` Dag-Erling Smørgrav
2008-05-06  9:11       ` Dag-Erling Smørgrav
2008-05-06  9:13         ` Dag-Erling Smørgrav
2008-05-06  9:24           ` Peter Stephenson
2008-05-06 10:24             ` Dag-Erling Smørgrav
2008-05-06 10:26               ` Peter Stephenson
2008-05-06 10:30               ` Dag-Erling Smørgrav
2008-05-06 10:42                 ` Peter Stephenson
2008-05-06 11:51                   ` Dag-Erling Smørgrav
2008-05-04 12:19 ` Peter Stephenson
2008-05-04 18:37   ` Peter Stephenson
2008-05-05  0:38     ` Phil Pennock
2008-05-05  0:41       ` Phil Pennock
2008-05-05 14:05       ` Peter Stephenson [this message]
2008-05-05 20:02       ` Jun T.
2008-05-06  2:32         ` Phil Pennock
2008-05-05  7:56     ` Dag-Erling Smørgrav

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=20080505150527.28261c46@pws-pc \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers+phil.pennock@spodhuis.org \
    --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).