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=fRhQG18ZVNhrSd4hw73NlydjwzVu6uo5nGlRK6VpXoG6SdjT+XuAb ZekG0KrAhm+9tt6yFO9r6x/1D5GAG1D8H2yo9JWcXET+OI9Y11B5OA5Bn9FN5Zug RKImRCTkFtHrGhzDzPRy/vV2KPl6cNcCJgQHywNafWzFE7/p9kFYkQ= 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=e3nVguXh29suHRL+vevm05WQF60=; b=j/aE6XMj3Hl2tn2SWADPm9aESdjr evJJGSsJoJTnJvNJPgPpZwJmt4qvOSLddFDK3HAVUNhZq6cEmhr/CM8KHo2mrvsB zGWIBaDBM0hdOLTCNpohdreazQOXCJQRAaYS97+S7ADcx7YrkNaiItgCMh1Q2HSM pRnR/A7I8iH+TwQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-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 Date: Wed, 25 May 2016 10:44:30 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Invalid tm_zone from localtime() when TZ is not set Message-ID: <20160525084430.GA17601@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <932D033F-9DA4-4901-9158-328AA929FEC8 AT etr-usa DOT 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) --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--