<div dir="auto">I tend to agree that text algorithms on non-unicode text are probably of low value for standardizing. To the extent possible, we should provide the consortium algorithms in order to minimize needless creativity. <div dir="auto"><br><div dir="auto">On the other hand, I don&#39;t want to hide things without good reason. Unicode database queries, for example. They are not actually generally useful, and if you think they are the api you are looking for, you have probably missed the one you should actually have used. Nonetheless, I think we should probably provide access in a standard way, if just to allow better  implementations of algorithms. </div><div dir="auto"><br></div><div dir="auto">It&#39;s my sense that there&#39;s a weak preference for meaningful names for namespaces in std (which is an exception). Aliasing allows shorter ones, like rg for ranges. My preference would be to use `unicode`, even for the transcoding interfaces, as they will generally use scalar values internally. </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 30, 2019, 18:43 Corentin &lt;<a href="mailto:corentin.jabot@gmail.com">corentin.jabot@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank" rel="noreferrer">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" rel="noreferrer">Unicode@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/unicode" rel="noreferrer noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/unicode</a><br>
</blockquote></div></div>
_______________________________________________<br>
SG16 Unicode mailing list<br>
<a href="mailto:Unicode@isocpp.open-std.org" target="_blank" rel="noreferrer">Unicode@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/unicode" rel="noreferrer noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/unicode</a><br>
</blockquote></div>