220 26394 <f7a33e49-7c25-48ba-a2ff-4bc765335796@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: asorenji@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: iswalpha and locales
Date: Sat, 25 Jun 2016 13:00:53 -0700 (PDT)
Lines: 89
Approved: news@gmane.org
Message-ID: <f7a33e49-7c25-48ba-a2ff-4bc765335796@isocpp.org>
References: <5057e854-b2ea-4c39-81c7-367bc3e54080@isocpp.org>
 <5458114.SXJFP9uSZR@tjmaciei-mobl1> <op.yjmk55nhhnjspo@debian>
 <7091420.GCog6ZeHg6@tjmaciei-mobl1>
 <op.yjmmmiw0hnjspo@debian>
 <7f783407-0c3c-4381-a852-dfd12bc450d1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2885_325769785.1466884853903"
X-Trace: ger.gmane.org 1466884862 29324 80.91.229.3 (25 Jun 2016 20:01:02 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 25 Jun 2016 20:01:02 +0000 (UTC)
Cc: asorenji@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDSYF7ODTYPBB5WFXO5QKGQEEN5LP2A@isocpp.org Sat Jun 25 22:00:57 2016
Return-path: <std-proposals+bncBDSYF7ODTYPBB5WFXO5QKGQEEN5LP2A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f69.google.com ([209.85.213.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDSYF7ODTYPBB5WFXO5QKGQEEN5LP2A@isocpp.org>)
	id 1bGtlA-0006Rh-Iq
	for gclcip-std-proposals@m.gmane.org; Sat, 25 Jun 2016 22:00:56 +0200
Original-Received: by mail-vk0-f69.google.com with SMTP id v190sf123371795vka.1
        for <gclcip-std-proposals@m.gmane.org>; Sat, 25 Jun 2016 13:00:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=+eCSczAlcXaUeFnPFUBA3GFhogjr5tk3jnLe8HehTsM=;
        b=AiFueXb3XPFnKTB/dTqPK/wx0C6uR1nUBT/TSgIznLiXM3j6/L1BA+WkpRMtSgZXzB
         wKw8X8SHuAkwxKEAh5AP8rYIFqEGmGeHwo4oTGemE4pmS74asud6IIkHu3npCRENdfwU
         dgjwn7GFtlZgbhZAcuqFqT8zxVCQsQY8dkTwNHHIk+j1gvFnGSy0j082UqM3QbcW84SA
         PNSaUB6uPFI3QiBLz6iwhPhiHXyHr1uCVBGDg+Om0qfTjY39WTUbFhsMoYNsA7lXEw2P
         X4ymgoEW3mKRjoSLRiaFdgKqbTUUjQY4Hb1OHQnJZTf5rOA4RJibjUsIdKCf8gDxcWnU
         EpZA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=+eCSczAlcXaUeFnPFUBA3GFhogjr5tk3jnLe8HehTsM=;
        b=ytd+/oEkosNT1P6CaDb3QyGk/aN4LwMWCGq006IJ7RRJwoT7jmRhZsTJE0EA0XBBFg
         07NibbTOb5Y4p58L/W8sw3e58ZZXwKTwBbBTHkT847kZp9f9wfk1wuxtSqYsdADgy9Ow
         oYw95yfEHqaO9JcMeYHFJE8Hej0Xj5dTFPhXQ8l7Pdrb2GQY885eM2PK6xXLq18Zk08/
         SxoF9S6U/xDlsX/B+8dAAb+JKf6tDj/iSXToMxsbgKgGr1WThs5T672KLZb4IaDm8Oyb
         CCxVO7glJIoXwP4A2GgvZ24JQPW7/NcsA2HjuFgBQmTJ3I3n1ThL/s1i75RVp/LCj7SC
         DuZg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=+eCSczAlcXaUeFnPFUBA3GFhogjr5tk3jnLe8HehTsM=;
        b=L/X2spZnO8N2WvxKpvuDD7bsCttNbXtvlFcOkiyMRbMY9JvjxvNdPHmVMWCb1YkHK7
         Q1HDDClneFW4UMPeNLOQ101iseUTdC6zKwKwzj5kHV5f22QTJC4Zw1kXyw0uVRGKz2o1
         Z71liqrPjJ+WBS9jRoDAoiOu13o3HVQK7Ls8VI9d+nfnTbraa2xiDSpwNZvk2hLqdxAA
         sHgvu1KE9BIAjFaoYyuvy6DwH9SNrWm6zqzGTjemb0+nT6+X89fhKmOBNvjfsFZpI7Pe
         Pqd2RVd214qds8DAq+Ua+PsL8e70CplDNv2ae6WSPHe7rtOeJFsnfbhWFLdtAR31y+zF
         sBFw==
X-Gm-Message-State: ALyK8tIo3BQg7DKW+ShHlSeLp6tRfhZ6x6J0bnIpWKApe9arltZZ1nRJc7GdYTadaEIrrg==
X-Received: by 10.13.245.70 with SMTP id e67mr9921311ywf.29.1466884855624;
        Sat, 25 Jun 2016 13:00:55 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.210.215 with SMTP id z206ls480439itf.7.gmail; Sat, 25 Jun
 2016 13:00:54 -0700 (PDT)
X-Received: by 10.36.124.143 with SMTP id a137mr120584itd.9.1466884854716;
        Sat, 25 Jun 2016 13:00:54 -0700 (PDT)
In-Reply-To: <7f783407-0c3c-4381-a852-dfd12bc450d1@isocpp.org>
X-Original-Sender: AsoRenji@gmail.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:26394
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26394>

------=_Part_2885_325769785.1466884853903
Content-Type: multipart/alternative; 
	boundary="----=_Part_2886_105151583.1466884853903"

------=_Part_2886_105151583.1466884853903
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



=D1=81=D1=83=D0=B1=D0=B1=D0=BE=D1=82=D0=B0, 25 =D0=B8=D1=8E=D0=BD=D1=8F 201=
6 =D0=B3., 22:09:47 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=
=D1=82=D0=B5=D0=BB=D1=8C Nicol Bolas =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=
=D0=BB:
>
>
>
> That's a lot of tables to be including. I believe that the table can be=
=20
> compacted via clever programming to be of reasonable length. But that wou=
ld=20
> require a good implementation to prove it.
>
bool isu32alpha(wint_t code)
{
    std::setlocale(LC_ALL,"any_unicode_locale");//implementation defined
    return iswalpha(code);
}
I'm already test this (see first post), it work very well.
Or:
bool isu32alpha(wint_t code)=20
{
    return code<=3D0x10FFFF?table[code/8]&(1<<(code%8))]:false;
}
0x110000 bites table - reasonable length. At least if you keep this table=
=20
in separate cpp file.

--=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/f7a33e49-7c25-48ba-a2ff-4bc765335796%40isocpp.or=
g.

------=_Part_2886_105151583.1466884853903
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>=D1=81=D1=83=D0=B1=D0=B1=D0=BE=D1=82=D0=B0, 25 =D0=
=B8=D1=8E=D0=BD=D1=8F 2016 =D0=B3., 22:09:47 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=
=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bolas =D0=BD=D0=B0=
=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gmail_quote" style=3D"m=
argin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"=
><div dir=3D"ltr"><br><br>That&#39;s a lot of tables to be including. I bel=
ieve that the table can be compacted via clever programming to be of reason=
able length. But that would require a good implementation to prove it.<br><=
/div></blockquote><div><div>bool isu32alpha(wint_t code)<br>{</div><div>=C2=
=A0 =C2=A0 std::setlocale(LC_ALL,&quot;any_unicode_locale&quot;);//implemen=
tation defined</div><div>=C2=A0 =C2=A0 return iswalpha(code);<br>}</div><di=
v>I&#39;m already test this (see first post), it work very well.</div><div>=
Or:</div></div><div>bool isu32alpha(wint_t code)=C2=A0</div><div>{</div><di=
v>=C2=A0 =C2=A0=C2=A0return code&lt;=3D0x10FFFF?table[code/8]&amp;(1&lt;&lt=
;(code%8))]:false;<br>}</div><div>0x110000 bites table - reasonable length.=
 At least if you keep this table in separate cpp file.<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/f7a33e49-7c25-48ba-a2ff-4bc765335796%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f7a33e49-7c25-48ba-a2ff-4bc765335796=
%40isocpp.org</a>.<br />

------=_Part_2886_105151583.1466884853903--

------=_Part_2885_325769785.1466884853903--

.
