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:message-id:from:to:subject:in-reply-to | |
:references:mime-version:content-type; q=dns; s=default; b=ZMzGS | |
vKpHCn+FGSoLKner7G/pxx1s6WUQSlYU0lmI8UZKQTcBb03dFaG5lFVljkX0Mik4 | |
/bDDTQUrOwbsUQlb/q0ZbJe3e4tehCVjLZmgx9gnJPJISxBCrxq4HXbeRMAeQKpI | |
QzrVmdXbG9il3SncC3snq1FZGrxZoPsmN964Fk= | |
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:message-id:from:to:subject:in-reply-to | |
:references:mime-version:content-type; s=default; bh=4TuAQA0S0UL | |
jNovjLGPU51/c6ZM=; b=yIAvJXlGG4E44h863IJszd2ceyGKr14LRmIO4J56XXr | |
3uKoiBtzkqO0WwHc1SR7NCBhrBNqsiTZKa+g59+iBxZb/OlGs8tANC6JE0S3uCyC | |
GPs8DS9RxVxKUh+/Z4dbOj6i44+m3Z6Jok/C57fkd4dSrQk/Gk8+dT9dYEoh3zPw | |
= | |
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=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=raduly, csaba, Csaba, Raduly |
X-HELO: | mgwym02.jp.fujitsu.com |
X-SecurityPolicyCheck: | OK by SHieldMailChecker v2.2.3 |
X-SHieldMailCheckerPolicyVersion: | FJ-ISEC-20140219-2 |
Date: | Fri, 20 May 2016 19:16:37 +0900 |
Message-ID: | <o8x37pd6nlm.wl-koba@jp.fujitsu.com> |
From: | KOBAYASHI Shinji <koba AT jp DOT fujitsu DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Invalid tm_zone from localtime() when TZ is not set |
In-Reply-To: | <CAEhDDbA-ATpAtVggR7cfqn58AHw0sPK_Y3mNSJ8UO29sg2ZpuA@mail.gmail.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> |
User-Agent: | Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.5 (x86_64-unknown-cygwin) MULE/6.0 (HANACHIRUSATO) |
MIME-Version: | 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") |
X-TM-AS-MML: | disable |
X-IsSubscribed: | yes |
Hi, >>>>> Csaba Raduly wrote: > If the type of those members is WCHAR[] then using isascii() / > isupper() on them is just plain wrong. > The correct function to use would be iswupper(). I agree that isw*() functions should be used for wchar_t. But I think just changing isupper() to iswupper() is not enough as I explain below. If iswascii() was available, using both iswascii() and iswupper() might be a candidate. > The line > if (isupper(*src)) *dst++ = *src; > (where src is wchar_t* and dst is char*) assumes that the upper 8 bits > of *src are zero (or *src is -1). > If not, the behavior is at best implementation-defined (maybe even undefined). With Japanese Windows, the upper 8 bits of *src are not zero. So I would like to correct the behavior. I think adding isascii() can be a compromise. >> 1. Using iswupper() instead of isupper(). >> - Although this method is effective for Japanese environments, it >> is not assured that the character iswupper() returns true fits in >> the range of ASCII. > It is highly likely that if the argument of iswupper() does not fit > into ASCII then its result won't fit either. I'm not sure if I understand what you are saying, but for example iswupper(L'\uff21') returns 1 in Japanese locale. Regards, KOBAYASHI Shinji. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |