From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72862 invoked by alias); 25 May 2016 08:44:36 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 72847 invoked by uid 89); 25 May 2016 08:44:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-95.6 required=5.0 tests=AWL,BAYES_40,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=CAPITAL, la, SMALL, LA X-HELO: calimero.vinschen.de Received: from ipbcc04766.dynamic.kabel-deutschland.de (HELO calimero.vinschen.de) (188.192.71.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 May 2016 08:44:32 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 73F1BA80856; Wed, 25 May 2016 10:44:30 +0200 (CEST) Date: Wed, 25 May 2016 10:15:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Invalid tm_zone from localtime() when TZ is not set Message-ID: <20160525084430.GA17601@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <932D033F-9DA4-4901-9158-328AA929FEC8@etr-usa.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-SW-Source: 2016-05/txt/msg00306.txt.bz2 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1543 On May 25 11:28, KOBAYASHI Shinji wrote: >=20 > Any other comments on this topic? Let me explain my proposal again. >=20 > The intention of the following code in tzsetwall() should be to pick > up UPPERCASE letters "in ASCII range": >=20 > if (isupper(*src)) *dst++ =3D *src; >=20 > NOTE: src is wchar_t *, dst is char *. >=20 > As Csaba Raduly pointed out, isw*() functions should be the first > choice if they achieve the desired behavior (select uppercase AND > ASCII). However, iswupper() does not fit for this purpose, as it > returns 1 for L'\uff21' for example. And I could not find isw*() In that case, wouldn't it make sense to fix iswupper in the first place? It relies on the towupper function in newlib/libc/ctype/towlower.c. However, I don't understand the example. 0xff21 is FULLWIDTH LATIN CAPITAL LETTER A. This is very certainly an uppercase letter so towlower transforms it to 0xff41, FULLWIDTH LATIN SMALL LETTER A. However, testing this with GLibc it turns out that GLibc's towlower does not transform the character but returns 0xff21. Can anybody explain to me why?= =20=20 Apart from that, we can workaround all problems in tzsetwall by just checking for=20 if (*src >=3D L'A' && *src <=3D L'Z') So, yeah, I can do the above change to tzsetwall and it would be nice if somebody could take a critical look over newlib's towlower.c and toupper.c. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --Qxx1br4bt0+wmkIi Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXRWXuAAoJEPU2Bp2uRE+gtxwP/igWYaIHOqqGaZoFkgJVkaa6 bOextvaXFBEWSv/Xp/KgTJF/rYxW3s/gbXF9jNLmXfzIdolawhZgFvICpJQIFJ6y B2XTXAulBEY6S3xyIgN0Zq86vMuWEmavqLpCW9qPrqXlavIAlII2maVwr6h9ptyW zIFSMFrRuPStbm6OfgAMoivbajnmlQAd/Bk57JOk8yhORqb5eUghd1lMqgEeFDHa p6jq7Bcc2vq0keB2NUAmsVvQ+YLSFF24QNsmbPm2EnMT114zEA0tF9lTkSv1D/OQ MPEKyl5ZViI24erfeYsjcQqH9kvmifD5CUJWmzMcGBB3bcOTm4+l7ZLJifjzlu8L x+1NB4Ksayv1fQs7aYtNHMbFs64UtuopIcZUgVB3LwjMB1oQPnVJYUxCT+dm8ffz WWvURFsqnDTY5CCb7PBZJgsZyfajrRZuY7y0BQu3dky8VR4AhrWtP050YdeHhlMf hLYF/EsIlawxvtJJ4fFMyHTueCep52f0u8KaAkrZrVhTRTAJq8tT1sF7MuTZPkI/ x+iIqrq4AXUX4FWMFfQN/1y2PYDXLJA/lxal+3L5hgvNqcusGxnr+wy9htGWtqUD DCyvj4PZRiJTdWI44FGZqFCKQXpy1KHWQJAxy8RmUGtkyE6TkM8yKU7lRyAjrNsS fVmgMwAAUI1bEV0W9/f4 =Yt2o -----END PGP SIGNATURE----- --Qxx1br4bt0+wmkIi--