public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Subject: Re: wcwidth and terminals [Re: Mg3a - a version of Mg2a developed on Cygwin]
Date: Sat, 26 Feb 2011 09:52:00 -0000	[thread overview]
Message-ID: <AANLkTi=RBB-Lsoz7vkCeE7iF-R6zVf5rOA2Wx4O2q9x_@mail.gmail.com> (raw)
In-Reply-To: <20110225110530.GX9392@calimero.vinschen.de>

On 25 February 2011 11:05, Corinna Vinschen wrote:
> On Feb 25 09:05, Thomas Wolff wrote:
>> For cygwin, it might be useful (although not standard) for wcwidth
>> to consider whether it's running in a cygwin console or a terminal,
>> so e.g. wcwidth (0x8080) should return 2 in mintty but 1 in a cygwin
>> console.
>
> Hmm, I don't think that's the right thing to do.  How's the OS version
> of wcwidht supposed to know what the wcwidth function is used for?
> After all, the application does *not* specify that it calls wcwidth
> to get the size of a character for a specifc purpose.  How's the function
> to know that the character is supposed to be printed to the current tty?
> What if the application has open handles to more than one tty?

I agree. Also, I'd be surprised if character width in the console was
actually constant across different locales, fonts, and Windows
versions.

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

      reply	other threads:[~2011-02-26  9:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23  8:57 Mg3a - a version of Mg2a developed on Cygwin Bengt Larsson
2011-02-23  9:11 ` Bengt Larsson
2011-02-23  9:29   ` Corinna Vinschen
2011-02-23  9:33     ` Bengt Larsson
2011-02-23 18:25 ` Buchbinder, Barry (NIH/NIAID) [E]
2011-02-23 18:53   ` Andrew Schulman
2011-02-23 19:36     ` Bengt Larsson
2011-02-24  8:56       ` Corinna Vinschen
2011-02-24 10:56         ` Bengt Larsson
2011-02-24 11:15           ` Corinna Vinschen
2011-02-24 11:40             ` Bengt Larsson
2011-02-24 11:55               ` Corinna Vinschen
2011-02-24 12:16             ` Andy Koppe
2011-02-24 18:51               ` Bengt Larsson
2011-02-25  2:24                 ` Cyrille Lefevre
2011-02-25  2:25                   ` Cyrille Lefevre
2011-02-25  6:48                     ` Bengt Larsson
2011-02-25  6:47                   ` Bengt Larsson
2011-02-25  6:55                     ` Kenneth Wolcott
2011-02-25 14:09                       ` Bengt Larsson
2011-02-25 21:46                         ` Bengt Larsson
2011-02-26  2:48                           ` Kenneth Wolcott
2011-02-24 11:19           ` Bengt Larsson
2011-02-24 11:51             ` Corinna Vinschen
2011-02-24 14:48               ` Eric Blake
2011-02-25  8:05         ` wcwidth and terminals [Re: Mg3a - a version of Mg2a developed on Cygwin] Thomas Wolff
2011-02-25 11:06           ` Corinna Vinschen
2011-02-26  9:52             ` Andy Koppe [this message]

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='AANLkTi=RBB-Lsoz7vkCeE7iF-R6zVf5rOA2Wx4O2q9x_@mail.gmail.com' \
    --to=andy.koppe@gmail.com \
    --cc=cygwin@cygwin.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).