www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/20/15:41:15

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <200905201652.n4KGqYGm000509@mail.bln1.bf.nsn-intra.net>
References: <20090512165404 DOT GW21324 AT calimero DOT vinschen DOT de> <416096c60905120956n5521929bm69586f5e6325a994 AT mail DOT gmail DOT com> <20090512173153 DOT GY21324 AT calimero DOT vinschen DOT de> <3f0ad08d0905140858j17c7b374paa649f18ef18178d AT mail DOT gmail DOT com> <200905201652 DOT n4KGqYGm000509 AT mail DOT bln1 DOT bf DOT nsn-intra DOT net>
Date: Thu, 21 May 2009 04:40:54 +0900
Message-ID: <3f0ad08d0905201240g1ea7dd8at8843e5fabb17fcbc@mail.gmail.com>
Subject: Re: [Fwd: [1.7] wcwidth failing configure tests]
From: IWAMURO Motonori <deenheart AT gmail DOT com>
To: newlib AT sourceware DOT org, 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

2009/5/21 Thomas Wolff <towo AT towo DOT net>:
>> > Therefore, I propose to use *_cjk() when the language part of LC_CTYPE
>> > is 'ja', 'ko', 'vi' or 'zh'.
> The problem with this is
> 1. As you say, there is no standard.

But,
- I think that my proposal doesn't violate any specification.
- I heard that there is an existing implementation that behave like my
proposal. (Sorry, I didn't hear the system name.)

> 2. If you wish to handle character widths compliant with the terminal
> =A0 your application is running in, there is no guarantee that your
> =A0 assumption of CJK width (or the actual locale setting if that model
> =A0 would be implemented) does indeed reflect the terminal's width proper=
ties.

Yes, I understand it, too. My proposal is completely workaround.
But it is the best solution because we have no specification/standard
for my wish.

> 3. In mintty, you can dynamically change width properties by selecting
> =A0 different fonts; mintty changes CJK width behaviour according to cert=
ain
> =A0 font properties. "static" configuration in your shell using a locale
> =A0 variable would not reflect this change

It is no problem because we -- most Japanese language users -- need
not change the settings of mintty and locale after first setup.
We set LANG=3Dja_JP.UTF-8 and select a Japanese font for mintty.

> =A0 I see two ways to handle this:
> =A0 a) Ask Andy (author of mintty) to not do this switching;

It is not necessary bacause the mechanism is based on my another
poroposal. ("deenheart" is my handle on google code.)

> other terminals don't switch either.

If we use other terminals, we need switch CJK width option manually.
(xterm, mlterm, putty, ...)

> =A0 b) Determine the actual CJK width behaviour dynamically. That's what
> =A0 =A0 =A0mined does (in addition to other width property detection in g=
eneral).

It is the best solution. I think that we need specify the following:
- the escape sequence about language context for terminal emulater.
-- setting language context
-- getting language context
-- getting capability of language context
   (context is fixed, static or dynamic / acceptable languages)
- new multilingualized string/terminal API for terminal based applications.

And, we need rewrite too many applications by new API.

> I'm not happy with the idea of a cygwin-specific solution (or workaround).

I think that it is not cygwin-specific solution.
--=20
IWAMURO Motnori <http://vmi.jp/>

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

- Raw text -


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