220 26393 <CANh-dXkxD_COixQrCe6fAXRZ=j7VKa_Y1chu9OzdPBmR3vSuWw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "'Jeffrey Yasskin' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: iswalpha and locales
Date: Sat, 25 Jun 2016 22:52:25 +0300
Lines: 43
Approved: news@gmane.org
Message-ID: <CANh-dXkxD_COixQrCe6fAXRZ=j7VKa_Y1chu9OzdPBmR3vSuWw@mail.gmail.com>
References: <5057e854-b2ea-4c39-81c7-367bc3e54080@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1466884378 20732 80.91.229.3 (25 Jun 2016 19:52:58 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 25 Jun 2016 19:52:58 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDDM34EO6QDRBDOCXO5QKGQEKGTK4FA@isocpp.org Sat Jun 25 21:52:49 2016
Return-path: <std-proposals+bncBDDM34EO6QDRBDOCXO5QKGQEKGTK4FA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f198.google.com ([209.85.192.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDM34EO6QDRBDOCXO5QKGQEKGTK4FA@isocpp.org>)
	id 1bGtdI-0008Vg-0s
	for gclcip-std-proposals@m.gmane.org; Sat, 25 Jun 2016 21:52:48 +0200
Original-Received: by mail-pf0-f198.google.com with SMTP id 143sf313675788pfx.0
        for <gclcip-std-proposals@m.gmane.org>; Sat, 25 Jun 2016 12:52:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=WlstKNuFsk9n/uM5O7nkUC/Zu5j90BxqZQQ95wd6FlI=;
        b=XNYBZBY3vlT0UZGfzQAceiw31FPebrGd/0N5G4ZbxdfOlolMdtKhkYEjjksmiukRk1
         vIMxpmUhfEAwfg0AsbZ6nEyHKfXHWxts3KDTg4/EXwobhN3+934z6SHXa1BYxhOXT0vi
         erR2hidnv8/521aWfYkd61HH+l989PBxAQhdjBX4B72rFbYOa/ZAIsYnf7WEgLMWI5oH
         kCwZXzwjhKXaym1YhfSj+GnzxPPoy+wcY2qPNPlDjRefHLMRaETdoZ/FC3mvRjYm+6BE
         aMn6feKrNWJRUZ6ZPIqFrqGFsDMsi9ImgofCS3gt+bdf1sfSz0JbAQrLdprWfKCYmVeq
         6Zlw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=WlstKNuFsk9n/uM5O7nkUC/Zu5j90BxqZQQ95wd6FlI=;
        b=A5QHLWHXRs0Flb3vqhHM51C+f4FEqgAUs5IUYmUBZBbwTHrzjZQuJbuLA1DVS2AlFK
         E6HB36TJ4rag/FLZTvSdIIvOnSXPyQZwRbX5jlJi4MGzGyL53Zx4kgf8oSLaP385nEZ0
         lh6mDSaeiP/cmAivGscxl1s4cElMCBl69RtOmjn+atUHyT2BMElAJC8ahwzK6a48pthn
         AfwowY1Z5D8LRj9V1R8ubgDkTs5aYWs/AFKF7nQWPRcxfP3NUgFvuZdczN2jUoZT0lNR
         T7FVDBLLWdz9dMH+PuxPiZCRfbBELfo5l9oYXN1MjYFUu0YeUks8h+iTSSvWHXvXvkRq
         /gM 
X-Gm-Message-State: ALyK8tI/xZPC/6I4RVazsWHYXyxpBBn46XBx6nWJuT55jUTJoJ71ZNYDu7CesSh3Sh/i3w==
X-Received: by 10.66.142.41 with SMTP id rt9mr10032033pab.3.1466884366753;
        Sat, 25 Jun 2016 12:52:46 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.16.232 with SMTP id 101ls3707994ioq.41.gmail; Sat, 25 Jun
 2016 12:52:45 -0700 (PDT)
X-Received: by 10.36.122.210 with SMTP id a201mr3214351itc.13.1466884365537;
        Sat, 25 Jun 2016 12:52:45 -0700 (PDT)
Original-Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com. [2607:f8b0:4001:c0b::22b])
        by mx.google.com with ESMTPS id 76si11390798ioo.188.2016.06.25.12.52.45
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 25 Jun 2016 12:52:45 -0700 (PDT)
Received-SPF: pass (google.com: domain of jyasskin@google.com designates 2607:f8b0:4001:c0b::22b as permitted sender) client-ip=2607:f8b0:4001:c0b::22b;
Original-Received: by mail-it0-x22b.google.com with SMTP id h190so37453715ith.1
        for <std-proposals@isocpp.org>; Sat, 25 Jun 2016 12:52:45 -0700 (PDT)
X-Received: by 10.36.2.2 with SMTP id 2mr3243454itu.34.1466884365096; Sat, 25
 Jun 2016 12:52:45 -0700 (PDT)
Original-Received: by 10.64.225.228 with HTTP; Sat, 25 Jun 2016 12:52:25 -0700 (PDT)
In-Reply-To: <5057e854-b2ea-4c39-81c7-367bc3e54080@isocpp.org>
X-Original-Sender: jyasskin@google.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@google.com;       spf=pass (google.com: domain of
 jyasskin@google.com designates 2607:f8b0:4001:c0b::22b as permitted sender)
 smtp.mailfrom=jyasskin@google.com;       dmarc=pass (p=REJECT dis=NONE) header.from=google.com
X-Original-From: Jeffrey Yasskin <jyasskin@google.com>
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:26393
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26393>

On Sat, Jun 25, 2016 at 11:48 AM, Renji <asorenji@gmail.com> wrote:
> As i can see in en.cppreference.com, iswalpha return true for "any
> alphabetic character specific to the current locale". Thanks for this, in
> Debian iswalpha(L'=E3=81=8B') (=E3=81=8B - symbol from hiragana) return f=
alse if i'm not
> call std::setlocale before iswalpha. And iswalpha(L'=E3=81=8B') return tr=
ue if i
> call std::setlocale with any valid locale name (testing for en_US.UTF-8,
> ru_RU.UTF-8 and even C.UTF-8). It's make no sense. I'm work with unicode
> character, why i'm need locales? And if this locale contain some importan=
t
> data, why name of locale is not important?
>
> Proposal: iswalpha must not depend on any locales.
> PS Sorry if my English is bad.

I think Thiago has it: when wchar_t and iswalpha were designed,
Unicode hadn't won yet, so they're designed to work with non-Unicode
encodings. I don't know of any truly double-byte encodings other than
UTF-16, but wchar_t could be 4 bytes and encode GB-18030 instead of
UTF-32.

The committee is interested in improving our Unicode support, and
we're actively looking at proposals to do so, including
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0353r0.html
and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0244r1.html.
I think we'd also welcome a set of predicate functions that assume
their input is in one of the UTF formats and check for the unicode
character class. You may have to figure something out for
multi-code-unit characters, or limit the proposal to char32_t.

Jeffrey (Library Evolution chair)

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CANh-dXkxD_COixQrCe6fAXRZ%3Dj7VKa_Y1chu9OzdPBmR3=
vSuWw%40mail.gmail.com.

.
