delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/26/04:52:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_WC,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20110225110530.GX9392@calimero.vinschen.de>
References: <35i9m6pt07r66fib882etg5tgirkr413co AT 4ax DOT com> <0105D5C1E0353146B1B222348B0411A209DAA0FF98 AT NIHMLBX02 DOT nih DOT gov> <fklam6ptp2uu7o029pkng8e4vc953fnfme AT 4ax DOT com> <ijmam6h3u1vq8nepvdlfo3hcb5feoeihav AT 4ax DOT com> <20110224085617 DOT GM9392 AT calimero DOT vinschen DOT de> <4D6762B5 DOT 3000204 AT towo DOT net> <20110225110530 DOT GX9392 AT calimero DOT vinschen DOT de>
Date: Sat, 26 Feb 2011 09:52:13 +0000
Message-ID: <AANLkTi=RBB-Lsoz7vkCeE7iF-R6zVf5rOA2Wx4O2q9x_@mail.gmail.com>
Subject: Re: wcwidth and terminals [Re: Mg3a - a version of Mg2a developed on Cygwin]
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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. =C2=A0How's the OS versi=
on
> 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. =C2=A0How's the fun=
ction
> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019