www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=Dr6pW6YFVmBLJYfyPAQ+reJ+h5okR68v/Mvf4f1fv6W0KZUH2VAV/ | |
i3Eb421+UaDeYeCWPD6DJT/N98WFxoxEgRlHmevfQzI6t5xtRkSHVSv00qjC/QyE | |
RF6/9YLtKIEJt2xwh8WHkB9S4xaPt4flo9Ps3YxFW9cJoc+4VC2hJY= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=enMNx4YjPDEe3i/Lfc+t8SoI7qE=; b=p6IqJBi120ev3LKB4fSm30va8iOw | |
QYSl/lhiRU9iV4HskGO47GZAJOxpy0igvpcUcHv1QPG3MzrUAXY8Ns9imVw0fBG0 | |
mgSkY5VVYxP3d4OLVHZntlkeaXs6y7CeUSLaexpghnn4GktbNx2/ey9coCb+AOcP | |
fGnm4Dqpe4uxG/c= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-96.5 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=H*f:sk:o8xh9dl, H*i:sk:o8xh9dl, H*MI:sk:o8xh9dl, 8.0 |
X-HELO: | calimero.vinschen.de |
Date: | Thu, 26 May 2016 12:23:03 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Invalid tm_zone from localtime() when TZ is not set |
Message-ID: | <20160526102303.GD8416@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <o8xeg8x7e2r DOT wl-koba AT jp DOT fujitsu DOT com> <932D033F-9DA4-4901-9158-328AA929FEC8 AT etr-usa DOT com> <o8x8tz573zs DOT wl-koba AT jp DOT fujitsu DOT com> <CAEhDDbA-ATpAtVggR7cfqn58AHw0sPK_Y3mNSJ8UO29sg2ZpuA AT mail DOT gmail DOT com> <o8x37pd6nlm DOT wl-koba AT jp DOT fujitsu DOT com> <o8xposa6fcl DOT wl-koba AT jp DOT fujitsu DOT com> <20160525084430 DOT GA17601 AT calimero DOT vinschen DOT de> <2eddaaf6-4e37-cd9b-aa9d-8a87234d0cf9 AT t-online DOT de> <o8xh9dltilz DOT wl-koba AT jp DOT fujitsu DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <o8xh9dltilz.wl-koba@jp.fujitsu.com> |
User-Agent: | Mutt/1.6.1 (2016-04-27) |
--raC6veAxrt5nqIoY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On May 26 15:54, KOBAYASHI Shinji wrote: > On Wed, 25 May 2016 22:02:50 +0200, Hans-Bernhard Br=C3=B6ker wrote: > > On May 25 11:28, KOBAYASHI Shinji wrote: > >> The intention of the following code in tzsetwall() should be to pick > >> up UPPERCASE letters "in ASCII range": > > Are you sure you're not mixing ASCII with '8-bit character' range there? >=20 > I'm not sure if non-ASCII 8-bit characters are allowed as TZ > names. I just guessed the intention from the fact isupper() is used, > and from the description of isupper() man page: >=20 > - isupper is a macro which classifies ASCII integer values by table > lookup. > - It is defined only when isascii(c) is true or c is EOF. >=20 > However, the implementation of isupper() seems to work for 8-bit > characters even if isascii() is false. Does the man page need some > changes? >=20 > > A proper solution may have to be more like this: > > int mapped =3D wctob(*src); > > /* this call is safe now because of how wctob() works: */ > > if (isupper(mapped)) { > > *dst++ =3D (unsigned char)mapped; > > } >=20 > Thank you for pointing out wctob(). I'm in favor of fixing this way. I fixed it already in the repo using explicit testing for L'A' <=3D wchar <=3D L'Z', see https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D030d86d04db= d6ae878ff894256c5a465890d5970 > On Wed, 25 May 2016 10:44:30 +0200, Corinna Vinschen wrote: > > However, testing this with GLibc it turns out that GLibc's towlower doe= s not > > transform the character but returns 0xff21. Can anybody explain to me = why?=20=20 > It seems that it depends on locale. The man page (on Linux) says: >=20 > The behavior of towlower() depends on the LC_CTYPE category of the > current locale. >=20 > I observed that it returns 0xff41 when LANG=3Dja_JP.UTF-8, and 0xff21 > when LANG=3DC. >=20 > Cygwin's implementation (and man page) does not seem to depend on > locale. No, it's basically fixed code inside newlib. I have some code prepared to update newlib from Unicode 5.2 to Unicode 8.0, but it adds a lot of extra code. So many new characters... Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --raC6veAxrt5nqIoY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXRs6HAAoJEPU2Bp2uRE+gryEP/1pe+dH8KYfgD9RnZXKd7eET Z6jwOBin4A4kTzjI6ImOOGIEyILzpeLa+s1ah2NBDI31wNIPQlKivmWDcsReVOdy /lfbIoXsWZgAO54I7D02KLOD6YYHPmKOSOXfCz+lZZEEPTZf29o79amt+5h4aiUW 7dA3LTaqgN/5DlN2Sme8bRWvkphbYOeXdBPf4yuQ52Lv+8Gx2IhQZfiFcbtVB7Ko UOW6ZpW6+hvagXlWhdIlb1ulDEWb3ZagdARe751QqyrZalC7uKmjXco3r+PJbS+b AqprEHLseJuar9f7DLZ54K6z0Q9MaRz+JXXe+Ylq0xn2CzFw69aPEi3rc7xqQSr4 ate/xs84SD3SwhNCh5GFqc3wnyga6A1wrUYRiKYS+7JD6GhNkC1p3/wdfk/s2Gvy BcLt8SVtBSA/Y9B/+ry+i+KU91OWJ4r2OmR4pOEIwBk3jz+05g3Ybe9euWK/GZzz i6bH9/G4MaUqE/WyM67Y4vwMVmGMekVN9ygGUJCi7922fr/avjpNjSE6qeABREK2 K9SlyeEr8PSVzYAL8eemBD1h71ktxTkR1iG5N5ZQ7R9tsRdDALdOrJZllhxSkwD/ rPpaC4IOWwejqV2Tf9htqPi2/DdCpw1GitM1JZ6mIXHhXZ8NoaMbh+Ab0x8nUDj8 qpFgFVAKJ5j7dNTi2CI2 =jGhK -----END PGP SIGNATURE----- --raC6veAxrt5nqIoY--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |