<div dir="ltr"><div>&gt; Is it really too much to ask that it be decoded according to the locale-specified encoding?</div><div><br></div><div>Locale-independence by default is a good property to have. In particular, it guarantees that std::formatted_size will return the size that is sufficient for a buffer passed in a subsequent call to std::format_to regardless of any locale shenanigan that happen in between (possibly in another thread).</div><div><br></div><div>However, one might argue that by explicitly specifying the width a user opted into encoding-aware behavior for strings (whether determined by locale or not), so maybe it&#39;s not as big of a problem as I initially thought. There is still a question of how to express the concept of perceived width in standardese wording. Thiago, do you have any suggestions?<br></div><div><br></div><div>- Victor<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 11, 2019 at 4:17 PM Thiago Macieira &lt;<a href="mailto:thiago@macieira.org">thiago@macieira.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wednesday, 11 September 2019 13:06:39 PDT Tom Honermann wrote:<br>
&gt; &gt; What can we say about the contents of &quot;result1&quot; and &quot;result2&quot;?<br>
&gt; &gt; Are they the same? Does it matter what the contents of `s` is?<br>
&gt; <br>
&gt; Excellent questions.<br>
&gt; <br>
&gt; I really want them to be the same (at least by default, additional<br>
&gt; opt-in support for locale/encoding sensitive alignment strike me as<br>
&gt; potentially reasonable assuming identification of compelling use cases).<br>
&gt; I don&#39;t think the contents of `s` should matter (without additional opt-in).<br>
<br>
On the other hand, this may be the perfect time to get rid of legacy mistakes. <br>
Any moderately good reason for them to be different should be enough.<br>
<br>
The big issue is understanding how many positions a string like &quot;\xc3\xa9&quot; <br>
consumes. Is it really too much to ask that it be decoded according to the <br>
locale-specified encoding?<br>
<br>
-- <br>
Thiago Macieira - thiago (AT) <a href="http://macieira.info" rel="noreferrer" target="_blank">macieira.info</a> - thiago (AT) <a href="http://kde.org" rel="noreferrer" target="_blank">kde.org</a><br>
   Software Architect - Intel System Software Products<br>
<br>
<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>