<div dir="ltr"><div>I&#39;ll report back my findings in a paper. It may not be solvable perfectly but I think we can come up with a good practical approximation that addresses the main use case and I&#39;m fine with not addressing esoteric ones. People somehow manage to write CLIs that do this and work with fancy emojis and Asian scripts even in C =).<br></div><div><br></div><div>- Victor<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 13, 2019 at 6:57 AM Niall Douglas &lt;<a href="mailto:s_sourceforge@nedprod.com">s_sourceforge@nedprod.com</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 13/09/2019 14:36, Victor Zverovich wrote:<br>
&gt;&gt; Instead of inventing something in the abstract, a good next step would<br>
&gt;&gt; be to figure out how (in UTF-8 mode) Apple Terminal, Gnome Terminal,<br>
&gt;&gt; Konsole, and the new Windows Terminal determine how many terminal<br>
&gt;&gt; display column a string takes. (I&#39;m not volunteering.)<br>
&gt; <br>
&gt; I&#39;m volunteering to do this since improving handling of width is already<br>
&gt; on my TODO list for the fmt library.<br>
<br>
I&#39;ll be interested in what you come up with on this, as I don&#39;t think<br>
this solvable.<br>
<br>
For example, imagine formatting into a file, and then that file is<br>
rendered onto a console.<br>
<br>
Another example: imagine formatting into a clipboard, which on Windows<br>
and POSIX might involve three or four renditions into differing formats<br>
and encodings. Then the consumer of the clipboard chooses an unknown one<br>
of those renditions, and reinterprets it in some unknown way into a<br>
paste into some document.<br>
<br>
Personally speaking, I think the best course is to declare codepoint or<br>
byte based formatting widths, and draw a line under it.<br>
<br>
Niall<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>