<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal">&gt; Grapheme breaking is simple, and requires no locale info.&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The encoding that goes with char* is part of the locale. Where the breaks go in a shift-jis stream is probably different than where they go in a UTF-8 stream or a latin-1 stream.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Billy3</p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Lib &lt;lib-bounces@lists.isocpp.org&gt; on behalf of Zach Laine via Lib &lt;lib@lists.isocpp.org&gt;<br>
<b>Sent:</b> Saturday, September 7, 2019 6:11:47 PM<br>
<b>To:</b> Library Working Group &lt;lib@lists.isocpp.org&gt;<br>
<b>Cc:</b> Zach Laine &lt;whatwasthataddress@gmail.com&gt;; Tony V E &lt;tvaneerd@gmail.com&gt;; Tom Honermann &lt;tom@honermann.net&gt;; unicode@isocpp.open-std.org &lt;unicode@open-std.org&gt;<br>
<b>Subject:</b> Re: [isocpp-lib] New issue: Are std::format field widths code units, code points, or something else?</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">On Sat, Sep 7, 2019 at 7:31 PM Tom Honermann via Lib &lt;<a href="mailto:lib@lists.isocpp.org">lib@lists.isocpp.org</a>&gt; wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="gmail-m_8939139310385341323moz-cite-prefix">On 9/7/19 8:27 PM, Tony V E wrote:<br>
</div>
<blockquote type="cite">
<div style="width:100%;font-size:initial;font-family:Calibri,&quot;Slate Pro&quot;,sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">
I think we would want it to be measured in glyphs. </div>
</blockquote>
I agree that would be ideal, but...<br>
</div>
</blockquote>
<div><br>
</div>
<div>Stop right there.&nbsp; If that's ideal, let's do that.&nbsp; Or at least, let's leave room for it to be done at some point.&nbsp; Specifying CUs now prevents the ideal from ever being realized.&nbsp;</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<blockquote type="cite">
<div style="width:100%;font-size:initial;font-family:Calibri,&quot;Slate Pro&quot;,sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">
Are you suggesting code points because glyphs are too hard?</div>
</blockquote>
I don't know how to achieve that.&nbsp; Field width doesn't really work for alignment unless one assumes a monospace font.&nbsp; We could measure in terms of extended grapheme clusters, but EGCS width has changed over time (e.g., family emoji).&nbsp; That makes alignment
 dependent on both display properties and Unicode version.&nbsp; And, of course, this would drag in locale dependence as well.</div>
</blockquote>
<div><br>
</div>
<div>If you just count N=EGCs, you get the &quot;right&quot; answer.&nbsp; if your terminal shows more or less than N characters, get a new terminal.&nbsp; What I mean by this is that there should be no consideration of fonts.</div>
<div><br>
</div>
<div>As for the need for a locale, I don't get that.&nbsp; Grapheme breaking is simple, and requires no locale info.&nbsp; Do you mean Unicode data?&nbsp; Picking a version and sticking with it should be sufficient.&nbsp; No system that I know of has multiple Unicode versions
 to pick from programatically.</div>
<div><br>
</div>
<div>Zach</div>
<div><br>
</div>
</div>
</div>
</div>
</body>
</html>