220 33077 <2600543.LJIS3b602g@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Why are there no standardized string
 manipulation algorithms ?
Date: Mon, 03 Jul 2017 12:02:32 -0700
Lines: 48
Approved: news@gmane.org
Message-ID: <2600543.LJIS3b602g@tjmaciei-mobl1>
References: <02cf02f4-df2e-4eb0-adcf-a7d167cd7e56@isocpp.org> <2585094.muaacRduSE@tjmaciei-mobl1> <e157603c-4181-4819-b29b-36ea7f3320d2@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1499108560 12631 195.159.176.226 (3 Jul 2017 19:02:40 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 3 Jul 2017 19:02:40 +0000 (UTC)
Cc: Bengt Gustafsson <bengt.gustafsson@beamways.com>
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBS5J5LFAKGQEII2JHJY@isocpp.org Mon Jul 03 21:02:36 2017
Return-path: <std-proposals+bncBCB4TK757YBRBS5J5LFAKGQEII2JHJY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f199.google.com ([209.85.192.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBS5J5LFAKGQEII2JHJY@isocpp.org>)
	id 1dS6cC-0002nt-1u
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Jul 2017 21:02:32 +0200
Original-Received: by mail-pf0-f199.google.com with SMTP id v9sf208261991pfk.5
        for <gclcip-std-proposals@m.gmane.org>; Mon, 03 Jul 2017 12:02:37 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1499108557; cv=pass;
        d=google.com; s=arc-20160816;
        b=uzeApudrjUoZicEuZvnxhjSNheLbST5tI3xcncgQSQ2jwg6beTW80HVcA6iNAVxYCp
         IIe7ZIj1KEvlf8QmIzBXp/25cJ3tTSkWC+1h3CuPlc5oQq8P6Lyeeg9fJqIepSWFcjzk
         tf54p2uECn7OXOYLuyTKrU5HagP105R1YIu45Jj0rKU61Q9ut0E7txT7UYNXRg+yX5Zz
         GfA3BxKtCggrWTke0XIzOVUPvu5vmuc2bkkncX2FGYuWvUfkVJMjjeXeAtjgHH+7RrbA
         Oc1oIh8RyEao7FWcrI6ACgdwqjQnI1+KnA6SuriUHkCt1kcgkoYgLV6eF6RYKqc3pTFs
         2jSw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-transfer-encoding
         :mime-version:references:in-reply-to:message-id:date:subject:cc:to
         :from:arc-authentication-results:arc-message-signature
         :dkim-signature:arc-authentication-results;
        bh=VojdyhpO8NtUuiJmHxcfV3GVAQCiWkjd0JmK56+zVuY=;
        b=lTn53ac9/Dl0/SX/tXwl/DRtOmZueZgjeeXzNQ+CfrjM0r+kSjIPIo4M0lWpRR/ZJe
         +OGrVZJysjt21/Op/XIt+6SSQnXAGcwS5mpmalp8WNehzKncHN//7qZbTPJcMa3c3KzX
         C7MR3Vm6fetx42nmRWnVOq+Dz0ER7BpnqJBcH1u7hl8jXDqc9OTTz6/Pt1FoKJdR36QT
         3xQUbval1AZrDLw/zfRGnuroDWHseM2zb/Q3jeHt2+IW7GHsKD59C8n9oeSwWOaFRFul
         qNWd17IWs9hTzhmJAbgh7LnFV7s+aZkSrsChHiyuVO3n+tLZ1T+B1hUsjas0BCsb3boV
         fcBw==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:cc:subject:date:message-id:in-reply-to:references
         :mime-version:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=VojdyhpO8NtUuiJmHxcfV3GVAQCiWkjd0JmK56+zVuY=;
        b=tuwAR/HF+VHmI93cdB3iXOwjY+3GsnzjQMtyBqygNzRoixatYWK5cntxllsmikNVNp
         1mDKh7pGjzcVBSMgIKtRKw8lJodhUIQg6LaqQ4Nwo/Uay0LoUBdvB5b5CYED7sVXnDer
         riPuwYtoWjcVMQMYDh2TdEvbmnR1RVNy3i+XcA4YgeZkwr+6nEY3y2jgowZa3JZNq4v/
         Poxp4SOaenTo2P+xZVDOGuyfoS5th3r1mobsrLdO90gPFAJSHkRYO9AO5w+9GAhrkUP8
         2vaqsbF8ZQ/g1UsHiSWyMjPEV7NPUSlYR7wklsx9H03kKKDk1LlerZYWld4B50pWMtWL
         uZKg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references:mime-version: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=VojdyhpO8NtUuiJmHxcfV3GVAQCiWkjd0JmK56+zVuY=;
        b=AIQxokO78ai2TCoUBNImNmRFWgdmYxtZrmAYiZTQbnDxeKaZQo7BhTG2EqOpoijQVs
         jHsRcSgVKkb91z2yliPgEJ2QqsYJHLxArXjvqntGdPh6PG1Pno7thQtMnc3a2N/8z6pT
         SOLem0aJSKm823VYBKYhfxMj4CKV7qsGT2VGwnCif7Sa6UsQtRnmHI146kXuVD9lxOdR
         Tu35nB5k38BCqMzM0awLGQQzaMeISrpTkOiREUo6xS1KwrpmSJ5xTa+/XQZAsVODYFkm
         YVsDLqIByfVMDMsemCTecO2TuSF6pcxM0knztUi3pcoSVwqX/RV1DqScZles6FCfx0q2
          
X-Gm-Message-State: AIVw111US/GX0E/a0xgS0wT4avRqUh7dawj5P9aNnNFbIvtLFoSSTvCA
	ZpV2ZOd3kGSmGzxC
X-Received: by 10.99.140.17 with SMTP id m17mr7778785pgd.69.1499108557112;
        Mon, 03 Jul 2017 12:02:37 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.80.84 with SMTP id m81ls10818540itb.20.canary-gmail; Mon,
 03 Jul 2017 12:02:35 -0700 (PDT)
X-Received: by 10.107.148.135 with SMTP id w129mr7635776iod.82.1499108555667;
        Mon, 03 Jul 2017 12:02:35 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1499108555; cv=none;
        d=google.com; s=arc-20160816;
        b=AQN6u+JVDg231ED065ZmPTQJRh12e5WY86ra1/cxC95Dl9QcRt7StNU+lVDyvgTyJI
         k0KNlW/tt6aoycsL++UQh9pCLNjcHBQLkSUxRCwdvCLYYCakJpsf9U5M0Et9Rpf411ha
         4OPHCjBF9ypACWiNeI2JyJKw/ZOXLooBNaZmv2KeG5p3kNoLK10YvC88koNfiN4EH/iA
         wap4cu7JmNjeyqv5BG61po2LN5MJQwlnY77JTEFxlrJCasMSdfVrvOjEEPoH65Q7XutJ
         DjjSvr5UGswRZ7wDxdQRr3FoFHCJ+29/MTc054ltxdTiwv8dHhb5zY7TXnqlw3C6D1Dm
         A0Hw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:arc-authentication-results;
        bh=KAPfEhQJ/NxeCG30qowF+qcTU+jakol4nrqY7cphB/8=;
        b=GCCD//bc/lEWeCOkG2ka6bF4a0uCCfrHPKO1UgLR4SLL53h4/jsVXkptMBOGtaJGdd
         xzefNirK2HseSRFvte8BQQ/NLO+BpRA2wdCJBxUdddqmb8PZJszWjax+kAcZ3zqQU9iZ
         1OqGwnMkZ4cgHT0Ip4yfIpCDqnUAkEXsHjYuq7Z7aHX9yCpNeWslmVvJ7C/o/V6GMivz
         eomi0VknSZrkvWtJp7Zociki0SkXXDNP+46MCiswCdvSD/yHiYgjg0exrUYRdhcnMKFw
         Sxd7xefwIc5TibUBy95Z/ql0sbjr1XeiesQZ/x32/o9zgDOfugiWgxG3MsW8Wcs95WAJ
         bafg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id v132si12608717ith.35.2017.07.03.12.02.35
        for <std-proposals@isocpp.org>;
        Mon, 03 Jul 2017 12:02:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (unknown [IPv6:2601:1c0:4501:5f9f:9c08:b220:419:2a84])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 81F4311B5A6;
	Mon,  3 Jul 2017 12:02:34 -0700 (PDT)
In-Reply-To: <e157603c-4181-4819-b29b-36ea7f3320d2@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <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:33077
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33077>

On segunda-feira, 3 de julho de 2017 11:49:38 PDT Bengt Gustafsson wrote:
> Isn't this code already inside the ctype towupper/twlower functions:
>=20
> http://en.cppreference.com/w/cpp/string/wide/towupper

No, By the simple signature of the function, it's impossible:

	std::wint_t towupper( std::wint_t ch );

Compare to:

	QString("=C3=9F").toUpper()

which produces QString("SS").

> I would imagine that the stringwise tolower/toupper functions would just =
be
> a loop around the corresponding character-wise functions.

Yeah, that's the wrong implementation.

> This brings out
> the subject of defining the locale of the character set, which it seems
> appropriate to have versions for explicitly and implicitly defining. Mayb=
e
> the somewhat messy nature of locales/facets and their scary application
> wide settability is what has held proposals for this feature back?

Right... there's the locale aspect. The Unicode case changing algorithms ar=
e=20
complex enough as it is.

And then there's Turkish, where towupper('i') =3D L'=C4=B0' and towlower('I=
') =3D L'=C4=B1'.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=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/2600543.LJIS3b602g%40tjmaciei-mobl1.

.
