<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 30 Mar 2019 at 22:12 Lyberta &lt;<a href="mailto:lyberta@lyberta.net">lyberta@lyberta.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ranges has made a precedent that we can provide better versions of old<br>
functions by putting them into a separate namespace. It is general<br>
consensus that almost all current text related function are obsolete. We<br>
should consider a namespace for new ones.<br>
<br>
I think std::text fits this. This namespace would contain functions that<br>
are modern and can properly support Unicode (and other encodings!).<br></blockquote><div><br></div><div>i think we are trying to limit the support for non unicode encodings to transcoding.</div><div>Unicode sandwich and all</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
There is also a precedent of my proposal and D1628 having separate<br>
namespace specifically for Unicode. Generally speaking, Unicode is a<br>
subset of text processing so in mathematical sense it would be obvious<br>
to put unicode namespace as std::text::unicode but here I agree that it<br>
is too much typing.<br></blockquote><div><br></div><div>You will find that LEWG will push strongly against that. </div><div>I agree we need _one_ namespace - it&#39;s will be a very hard sell. </div><div>Nested namespace is very unlikely to reach consensus. </div><div>So would be 2 non-nested namespaces</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So I propose the following:<br>
<br>
std::text for general purpose text algorithms (to be determined as we<br>
haven&#39;t even nailed the Unicode yet, but consider std::text::to_upper,<br>
std::text::is_alphanumeric).<br>
std::unicode for Unicode classes and algorithms. Everything in std::text<br>
should be able to work with classes from std::unicode.<br>
<br>
Then we can add more encodings under std or maybe right into std::text<br>
if they are too simple.<br>
<br>
Theoretical examples:<br>
<br>
std::ascii<br>
std::ebcdic<br>
std::shift_jis<br>
<br>
_______________________________________________<br>
SG16 Unicode mailing list<br>
<a href="mailto:Unicode@isocpp.open-std.org" target="_blank">Unicode@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/unicode" rel="noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/unicode</a><br>
</blockquote></div></div>