220 10631 <a62020fe-91bd-4d8d-8b7c-b4aa399e3e71@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: pecholt@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Unicode support in the Standard Library
Date: Thu, 15 May 2014 02:03:38 -0700 (PDT)
Lines: 82
Approved: news@gmane.org
Message-ID: <a62020fe-91bd-4d8d-8b7c-b4aa399e3e71@isocpp.org>
References: <4ef82544-cd98-4488-8230-88ddaea78562@isocpp.org>
 <CAGNvRgA4keukGYJG_Z0OAiHeBnKa55K5X=4EYdtvHxq6tT4G4w@mail.gmail.com>
 <002D029C-6783-4A62-8CC4-B32B7BE8B23D@gmail.com>
 <CAGNvRgB5xSjojj2cZjBaaG=hTcBuRrXJR39xDv0QG1HuQLJ_gQ@mail.gmail.com>
 <01f2cc36-e743-4782-891e-c074dc072c7f@isocpp.org>
 <CAGNvRgBQeFOzzqgbWGMDrVEgmeHPPsG8FF0Q_M=ZyH52DbwsqA@mail.gmail.com>
 <1d79df40-3313-4241-a9b8-d9364d68d327@isocpp.org>
 <CAFk2RUb8CrW1NbLJLcfSvZX4XvuPoqTP9XwVDeC43-2YCQ5yrg@mail.gmail.com>
 <d7a9ccd4-8758-415e-918f-0865618ab07d@isocpp.org>
 <b59b8b8b-3073-4b02-892c-0aa0dc62e8b2@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_132_29922195.1400144618755"
X-Trace: ger.gmane.org 1400144629 32602 80.91.229.3 (15 May 2014 09:03:49 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 15 May 2014 09:03:49 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD6KHDH5WIDBB24F2KNQKGQEXSJGMPQ@isocpp.org Thu May 15 11:03:42 2014
Return-path: <std-proposals+bncBD6KHDH5WIDBB24F2KNQKGQEXSJGMPQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f198.google.com ([209.85.220.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD6KHDH5WIDBB24F2KNQKGQEXSJGMPQ@isocpp.org>)
	id 1WkrZl-0003x3-1n
	for gclcip-std-proposals@m.gmane.org; Thu, 15 May 2014 11:03:41 +0200
Original-Received: by mail-vc0-f198.google.com with SMTP id ij19sf10478873vcb.9
        for <gclcip-std-proposals@m.gmane.org>; Thu, 15 May 2014 02:03:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=vXb5DDW8FQ7IogRBDG0fhrn0QjiQyBD0DnIJ8I0Bn7g=;
        b=HmFhJu0ybviJxCUAJPIgudXFW7avdChS4MUKx4d0cpWrKeC9uzXeIJWKG8/QnYFSRP
         0Pm5/lfESjyc1u1Nd3CxKMggqSxvHKQgDdxMxgR6DBWYIG5kfMubovEDa2Lp2y0O85SJ
         SuFB6Zax61z4jxJRBA2Tu2jzntXm7Lihf6CtwpshcwuDn4bwWV8JY5+w0E2z/eIJjt9j
         Wf07SQ4hdGTGi3tpGaVu9/wT0Xkt0z5gPK737KOV4W4V9MroJpbj5lpkakAY88YO1I2L
         TjGelwqvWHhI9m+EsXGDHoFjDRK++QhzQqwMZdWx04X1UqL/0o6fV02tXrkGa4XaefJZ
         dN6A==
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:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=vXb5DDW8FQ7IogRBDG0fhrn0QjiQyBD0DnIJ8I0Bn7g=;
        b=gXGyLZjJ5kHrCHflJRFYZDWneXTpYITn3QosOyr2CXRUGGJ42rDrX+Qig6hIgxbYMV
         N6yMIJGKMkY2rV2pOgNT8/MwxVrz5V0iHA8oZDPyU0dMslleVeogXWQ6H232vveTMePv
         0oILnBgqRobqdUHoIFSBAn24Lcqmnq2doqtvsKddl/ItOjBcmWAIO68iVcdSbs+GfRa/
         hOBko5o5ggsbxwVs1SRpkbFkchveXQZLBAbJeGJIQxVe/rCLRg9XIKadsIq6wC94to9P
         QmTd1T2FO+rzEJaslO7X2cP9c/nF1rjXypg2X9bN9G11C7Fyh3Jc2u34WEjZ/LFHSqb4
         k2SA==
X-Gm-Message-State: ALoCoQlzo7m7V5vt2hKY26YGbyMyY6QuvxHwngj5V1keqiP8g1YZmM4V9ws7Lv8qJU9eOT71kyEu
X-Received: by 10.52.4.164 with SMTP id l4mr3760424vdl.3.1400144620194;
        Thu, 15 May 2014 02:03:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.107.247 with SMTP id h110ls159449qgf.44.gmail; Thu, 15 May
 2014 02:03:39 -0700 (PDT)
X-Received: by 10.140.27.40 with SMTP id 37mr24212qgw.24.1400144619502;
        Thu, 15 May 2014 02:03:39 -0700 (PDT)
In-Reply-To: <b59b8b8b-3073-4b02-892c-0aa0dc62e8b2@isocpp.org>
X-Original-Sender: pecholt@gmail.com
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:10631
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10631>

------=_Part_132_29922195.1400144618755
Content-Type: text/plain; charset=UTF-8

I guess if neither basic_string nor char_traits can be modifier your 
previous example would like like this:

std::transform(lbegin_from<utf8>(input), lend_from<utf8>(input),lback_inserter
(result), to_upper);

this makes the interfaces slightly more complicated. I would personally 
consider it too verbose already because internal encoding is most like the 
same in all parts of program/dll but it has to be repeated on every line. 

I am not sure if it would be feasible to provide default encoding value so 
one doesn't need to repeat it everywhere (e.g. on windows default value 
would be utf8 for std::string and utf16 for std::wstring. On linux 
std::wstring would default to utf32)

-- 

--- 
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 email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_132_29922195.1400144618755
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I guess if neither basic_string nor char_traits can be mod=
ifier your previous example would like like this:<br><br><code><div class=
=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); border-colo=
r: rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: b=
reak-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span=
 style=3D"color: #000;" class=3D"styled-by-prettify">std</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">transform</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify">lbegin_from</span><span style=3D"color: #080;"=
 class=3D"styled-by-prettify">&lt;utf8&gt;</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">input</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">),</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> lend_from</span><span style=3D"color: #080;" class=3D"styled-by=
-prettify">&lt;utf8&gt;</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">input</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> lback_in=
serter</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">result</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">),</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> to_upper</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br></span></div></code></div><spa=
n style=3D"color:#000"></span></code><br>this makes the interfaces slightly=
 more complicated. I would personally consider it too verbose already becau=
se internal encoding is most like the same in all parts of program/dll but =
it has to be repeated on every line. <br><br>I am not sure if it would be f=
easible to provide default encoding value so one doesn't need to repeat it =
everywhere (e.g. on windows default value would be utf8 for std::string and=
 utf16 for std::wstring. On linux std::wstring would default to utf32)<br><=
/div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_132_29922195.1400144618755--

.
