220 26391 <7f783407-0c3c-4381-a852-dfd12bc450d1@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: iswalpha and locales
Date: Sat, 25 Jun 2016 12:09:46 -0700 (PDT)
Lines: 106
Approved: news@gmane.org
Message-ID: <7f783407-0c3c-4381-a852-dfd12bc450d1@isocpp.org>
References: <5057e854-b2ea-4c39-81c7-367bc3e54080@isocpp.org>
 <5458114.SXJFP9uSZR@tjmaciei-mobl1> <op.yjmk55nhhnjspo@debian>
 <7091420.GCog6ZeHg6@tjmaciei-mobl1>
 <op.yjmmmiw0hnjspo@debian>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_740_642100542.1466881786831"
X-Trace: ger.gmane.org 1466881797 11648 80.91.229.3 (25 Jun 2016 19:09:57 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 25 Jun 2016 19:09:57 +0000 (UTC)
Cc: asorenji@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBB65NXO5QKGQEBYY4VQY@isocpp.org Sat Jun 25 21:09:53 2016
Return-path: <std-proposals+bncBCEKFTV6ZUMBB65NXO5QKGQEBYY4VQY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f72.google.com ([209.85.218.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBB65NXO5QKGQEBYY4VQY@isocpp.org>)
	id 1bGsxh-0005Qy-K5
	for gclcip-std-proposals@m.gmane.org; Sat, 25 Jun 2016 21:09:49 +0200
Original-Received: by mail-oi0-f72.google.com with SMTP id d132sf188360895oig.0
        for <gclcip-std-proposals@m.gmane.org>; Sat, 25 Jun 2016 12:09:49 -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=U1P1Mi6ODdI+mIxRlw2PXMC9Lu0c713umWb9AA10PSY=;
        b=G4CTY4fGLYDz9/UuAj889Ui1IJzNjvgwsaGleyCoSTRNBAuhmcuWY+APLZTWj3+KrU
         VrpySPScM4bupCP2TA0eJjC0wYUXSGwYuid8Tof5P8jAzCr8RFJzh1p3nYvDVrlzMbwC
         e5BirqNzdZaZ8uYiLhRu8aJpQdFJVBxniRLPTtvh0OVviYd24/1wn9rm0OY8SfUhnTaj
         mN89DAP1TvxemSx33Tk7lhsJdiMEuR0SFlEaXISCLzYgx0p2y172mOSM84MoxZVWZaCB
         4tJ5d7GJ/9iR2C7fOz5LOKRPsOvaaHtcAl5GlSjPverhNaFB7gY+djhYnDCcAIilA2zx
         oHyA==
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=U1P1Mi6ODdI+mIxRlw2PXMC9Lu0c713umWb9AA10PSY=;
        b=Ffb5VcwKUIE09VTVhnfqJSv/dFYqOGlaY2EngaMBLhw+M6aUTRmTEcZpdrzqssQVGt
         ALbHicSxOq2XbbN69OJj9gbcB1G4uAEJK8tHHyZDuFGJo9dzirmPapXWsTAQ7QlR1aVm
         BmjlK5TuzGKS/gM0TKUoUWfFWUWzqaGt/9gSt2jMve2o+NCyv3hdzGHAd5nMXWTcM0Rc
         RKJoPAEN//3dxtbSY//xhz1K97/GXdjqO6dGtFYYbQR9asvFSieNMoI8x42TeWff0t5I
         D9DiCI7zAzPtpBmC5MFbn015Bz9pXNBNUrwGuWEICCcsa08C//1N9SS+5LAQpaPuJicL
         5E/g==
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=U1P1Mi6ODdI+mIxRlw2PXMC9Lu0c713umWb9AA10PSY=;
        b=N73obPhQEdRg9zRbhVHAGmndiZLVoD07usSUbyK9f6F46JUQpr4qj7hEXdVyafACH6
         iuc4xJJXE8NAWav0nIBld6GoT6GrVEW5JTP7XyrCpeaIOQqloH2CqiZxOd/Vs5YtuQMP
         3X1noAEDT73oCSqPBMj1UMbWOPwGFepN7soP93+0AGVZi+/oDuzBmOc1Npr7Kh0Ix0DN
         7/2uhxbsULOgy7qY4uUZFZRrI5wKHyXSrmLIh/0+cUoPxRgKYBcDnJB7YTAYEEmc3b9a
         yLeUt1fbp9WYsQg9Fng3LTYXHpqfzwsvUwEH/jCneM04P0GNRmJinQSXYSa0fUT4YL4n
         OXCA==
X-Gm-Message-State: ALyK8tJOw3WVrRUIRrxHND2Onu7h2exgb0F8FI47HhKaxUSMCZ6+tJOJhZJCbZcEZTw6Jw==
X-Received: by 10.157.47.241 with SMTP id b46mr9761191otd.40.1466881788548;
        Sat, 25 Jun 2016 12:09:48 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.14.6 with SMTP id 6ls3465303ioo.14.gmail; Sat, 25 Jun 2016
 12:09:47 -0700 (PDT)
X-Received: by 10.36.242.65 with SMTP id j62mr113163ith.8.1466881787723;
        Sat, 25 Jun 2016 12:09:47 -0700 (PDT)
In-Reply-To: <op.yjmmmiw0hnjspo@debian>
X-Original-Sender: jmckesson@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:26391
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26391>

------=_Part_740_642100542.1466881786831
Content-Type: multipart/alternative; 
	boundary="----=_Part_741_1977422704.1466881786836"

------=_Part_741_1977422704.1466881786836
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Saturday, June 25, 2016 at 2:50:32 PM UTC-4, Aso Renji wrote:
>
> Thiago Macieira <thi...@macieira.org <javascript:>> =D0=BF=D0=B8=D1=81=D0=
=B0=D0=BB(=D0=B0) =D0=B2 =D1=81=D0=B2=D0=BE=D1=91=D0=BC=20
> =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 Sat, 25 Jun  =20
> 2016 21:39:10 +0300:=20
>
> > You should use char16_t and char32_t to be sure to have Unicode.=20
> But iswalpha with char16_t argument don't exist. In this case I'm change =
 =20
> proposal to adding isalpha version for utf16/utf32 characters. For exampl=
e=20
>  =20
> - isu16alpha.=20
>

Here's the problem with that. Unicode has very complex rules about what=20
constitutes an "alphabetic" character. Indeed, it has a large list; for=20
every codepoint it defines, it says if that codepoint is alphabetic or not.=
=20
So too for many other questions like `isupper` and so forth.

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 would=
=20
require a good implementation to prove it.

Also, such functions cannot be applied to a `char16_t`, becuase a=20
`char16_t` is not a Unicode codepoint. It is only a UTF-16 code unit, which=
=20
may be a valid codepoint or it may be a surrogate pair for a valid=20
codepoint, in accord with the UTF-16 encoding rules.

--=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/7f783407-0c3c-4381-a852-dfd12bc450d1%40isocpp.or=
g.

------=_Part_741_1977422704.1466881786836
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Saturday, June 25, 2016 at 2:50:32 PM UTC-4, As=
o Renji wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Thiago Macieira =
&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"YGIf=
DRmCBQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;=
;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;">t=
hi...@macieira.org</a>&gt; =D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0) =D0=B2 =
=D1=81=D0=B2=D0=BE=D1=91=D0=BC =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 Sat, 25=
 Jun =C2=A0
<br>2016 21:39:10 +0300:
<br>
<br>&gt; You should use char16_t and char32_t to be sure to have Unicode.
<br>But iswalpha with char16_t argument don&#39;t exist. In this case I&#39=
;m change =C2=A0
<br>proposal to adding isalpha version for utf16/utf32 characters. For exam=
ple =C2=A0
<br>- isu16alpha.
<br></blockquote><div><br>Here&#39;s the problem with that. Unicode has ver=
y complex rules about what constitutes an &quot;alphabetic&quot; character.=
 Indeed, it has a large list; for every codepoint it defines, it says if th=
at codepoint is alphabetic or not. So too for many other questions like `is=
upper` and so forth.<br><br>That&#39;s a lot of tables to be including. I b=
elieve that the table can be compacted via clever programming to be of reas=
onable length. But that would require a good implementation to prove it.<br=
><br>Also, such functions cannot be applied to a `char16_t`, becuase a `cha=
r16_t` is not a Unicode codepoint. It is only a UTF-16 code unit, which may=
 be a valid codepoint or it may be a surrogate pair for a valid codepoint, =
in accord with the UTF-16 encoding rules.<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/7f783407-0c3c-4381-a852-dfd12bc450d1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7f783407-0c3c-4381-a852-dfd12bc450d1=
%40isocpp.org</a>.<br />

------=_Part_741_1977422704.1466881786836--

------=_Part_740_642100542.1466881786831--

.
