<div dir="ltr"><div class="gmail_default" style="font-family:'times new roman',serif">This sentence actually makes my point:</div><div class="gmail_default" style="font-family:'times new roman',serif"><br></div>

<div class="gmail_default" style="font-family:'times new roman',serif">> <span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:11px">Unless canonicalization produces only one representation, comparisons can fail and create unintended results. </span></div>

<div class="gmail_default" style="font-family:'times new roman',serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:11px"><br></span></div><div class="gmail_default"><font face="times new roman, serif"><span style="color:rgb(0,0,0);font-size:11px">Unicode canonicalization (NFC) of canonically equivalent sequences always produces a unique representation (the NFC form), if by "representation" you mean "sequence of code points". </span><span style="color:rgb(0,0,0);font-size:11px">And if you mean by comparison, "code point comparisons", then such comparison cannot fail.</span></font></div>

<div class="gmail_default"><font face="times new roman, serif"><br></font></div><div class="gmail_default"><span style="color:rgb(0,0,0);font-size:11px"><font face="times new roman, serif">If you mean something else by "representation" and "comparison", then you have to define exactly what you mean. And what I'm saying is that it would help, since we are talking about Unicode, to use the Unicode terms. So, for example, you might mean by "representation" a sequence of glyphs...</font></span></div>

<div class="gmail_extra"><div><div dir="ltr"><font face="'times new roman', serif"><div style="margin:0px;background-color:transparent"><div></div></div><div style="margin:0px;background-color:transparent"><br></div>

<div style="margin:0px;background-color:transparent"><a href="https://google.com/+MarkDavis" target="_blank">Mark</a></div><div style="margin:0px;background-color:transparent"><i><br></i></div><div style="margin:0px;background-color:transparent">

<i>— Il meglio è l’inimico del bene —</i></div></font><div><div><font face="'times new roman', serif"><i><span style="font-style:normal"><i></i></span><i></i></i></font></div></div></div></div>
<br><br><div class="gmail_quote">On Tue, Aug 12, 2014 at 8:09 AM, Vint Cerf <span dir="ltr"><<a href="mailto:vint@google.com" target="_blank">vint@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr">mark,<div><br></div><div>the problem is poverty of vocabulary then. I said nothing about "meaning" only about encoding and the side effects of having two ways to represent the same <character? glyph? thing?>. Unless canonicalization produces only one representation, comparisons can fail and create unintended results. </div>

<span class=""><font color="#888888">
<div><br></div><div>v</div><div><br></div></font></span></div><div class=""><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 12, 2014 at 10:53 AM, Mark Davis ☕️ <span dir="ltr"><<a href="mailto:mark@macchiato.com" target="_blank">mark@macchiato.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<font face="times new roman, serif">I just had a Princess Bride moment ​😮. <div style="font-family:'times new roman',serif;display:inline">



​Often when I've had disagreements with intelligent people, the disagreement turns out to be ​</div></font><span style="font-family:'times new roman',serif">a difference in the use of terms.<div style="font-family:'times new roman',serif;display:inline">





​ ​</div><div style="font-family:'times new roman',serif;display:inline">Bear with me a bit, while I set out how Unicode uses the terms, because it appears to be different than the IETF. </div>



</span><span style="font-family:'times new roman',serif">(I'll simplify a bit, but nothing material for the purpose of this discussion.)</span><div style="font-family:'times new roman',serif;display:inline">





​ </div><br></div><div><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">First, the term "character" has so many different meanings that it is best to avoid it completely where clarity is needed. So let's just talk about assigned Unicode code points and glyphs.</font></div>





<div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif"><b>Glyphs. </b>An assigned Unicode code point has an set of glyphs (shapes) that can normally represent it. Think of the letter 'a', for example. Not only has it different glyphs based on font-family, such as the following:</font></div>





</div><div style="text-align:center"><font size="4"><font face="comic sans ms, sans-serif">a</font>, <font face="courier new, monospace">a</font>, <font face="garamond, serif">a</font>, <font face="georgia, serif">a</font>, <font face="tahoma, sans-serif">a</font>, <font face="trebuchet ms, sans-serif">a, </font><font face="verdana, sans-serif">a</font></font></div>













<br><div><div dir="ltr"><div style="margin:0px;background-color:transparent"><div><font face="times new roman, serif">​but also variations within a font (regular vs italic), weights (not only bold and light, but arbitrary weights in between), width, size, etc. The set is theoretically unbounded, although there are of course physical limits. </font><span style="font-family:'times new roman',serif;background-color:transparent">For more, see: <a href="http://www.w3.org/TR/css3-fonts/" target="_blank">http://www.w3.org/TR/css3-fonts/</a></span></div>





<div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif"><b>Homoglyphs. </b>When two assigned Unicode code points have intersecting sets of glyphs, they are called homoglyphs. <span style="background-color:transparent">Examples:</span></font></div>





<div><ol><li><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=0430" target="_blank">U+0430</a></code><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent"> ( а ) CYRILLIC SMALL LETTER A</span><br>





</li><li><font face="times new roman, serif"><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=0061" target="_blank">U+0061</a></code><span style="color:rgb(0,0,0);background-color:transparent"> ( a ) LATIN SMALL LETTER A</span><span style="background-color:transparent">.</span></font></li>





</ol><font face="times new roman, serif"><span style="background-color:transparent">But this is not confined to single code points; it may include sequences of one or more code points, such as the following homoglyphs:</span><br>





</font></div><div><ol><li><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=00E5" target="_blank">U+00E5</a></code><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent"> ( å ) LATIN SMALL LETTER A WITH RING ABOVE</span><br>





</li><li><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=0061" target="_blank">U+0061</a></code><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent">,</span><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent"> </span><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=030A" target="_blank">U+030A</a></code><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent"> </span><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent">( å ) LATIN SMALL LETTER A, COMBINING RING ABOVE</span><br>





</li><li><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=0430" target="_blank">U+0430</a></code><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent">,</span><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent"> </span><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=030A" target="_blank">U+030A</a></code><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent"> </span><span style="font-family:'times new roman',serif;color:rgb(0,0,0);background-color:transparent">( а̊ ) CYRILLIC SMALL LETTER A, COMBINING RING ABOVE</span><br>





</li></ol><div><font face="times new roman, serif"><font color="#000000">Note that in some cases the overlap among glyph sets is very large; they are essentially the same. That is the case for #1, #2, and #3 above.</font></font></div>





<div><font face="times new roman, serif"><font color="#000000"><br></font></font></div><div><font face="times new roman, serif"><font color="#000000">In other cases, the overlap is much smaller: an italic glyph for  </font><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=0438" target="_blank">U+0438</a></code><span style="color:rgb(0,0,0);background-color:transparent"> ( и ) CYRILLIC SMALL LETTER I normally looks identical to an italic glyph for </span><code style="color:rgb(0,0,0);background-color:transparent"><a href="http://unicode.org/cldr/utility/character.jsp?a=0075" target="_blank">U+0075</a></code><span style="color:rgb(0,0,0);background-color:transparent"> ( u ) LATIN SMALL LETTER U, but non-italic glyphs are normally different. And there is a whole range between "essentially the same" glyph set and just a narrow overlap.</span></font></div>





<div><font color="#000000" face="times new roman, serif"><br></font></div><div><font color="#000000" face="times new roman, serif"><b>Confusables.</b> All homoglyphs are confusables. Confusables are just a bit broader. The glyph sets don't have to intersect: it is enough that some glyphs in each set are confusably similar. (More on that in TR36.)</font></div>





<div><font color="#000000" face="times new roman, serif"><br></font></div><div><font color="#000000" face="times new roman, serif"><b>Canonical Equivalence. </b>This is a specification for when Unicode considers that two sequences of code points are to be regarded as "meaning the same thing". Of course, there are other environments where "meaning the same thing" can be differently and more broadly interpreted, such as "has the same case folding", or "is a homoglyph". But canonical equivalence is the core Unicode definition.</font></div>





<div><font color="#000000" face="times new roman, serif"><br></font></div><div><span style="color:rgb(0,0,0);font-family:'times new roman',serif">So the following passage from Vint causes some head-scratching.</span><font color="#000000" face="times new roman, serif"><br>





</font></div><div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This is not about "confusables" in the sense that some characters look like others.<span style="background-color:transparent"> </span></blockquote>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">It is about the fact that the same glyph has multiple encodings that do not collapse to an unambiguous canonical form. </blockquote>





</div><div><font color="#000000" face="times new roman, serif"><br></font></div></div><div><font color="#000000" face="times new roman, serif">Let's walk through the example above.</font></div><div><ol><li><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent">The same glyph (for #1, #2, and #3 above) has multiple encodings (namely</span><font color="#000000" face="times new roman, serif" style="background-color:transparent"> #1, #2, and #3) above.</font></li>




<li><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent">They are homoglyphs, and thus confusables.</span></li><li><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent">#1 and #2 collapse to the same canonical form (#1)</span></li>




<li><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent">However, #3 does </span><i style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent">not</i><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent"> collapse to that form, despite "having the same glyph". In terms of Unicode, it "doesn't mean the same thing".</span></li>




</ol><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent">And #3 is not alone. Because of the combinatorics, there are probably more cases like #3 than there are Unicode characters! So U+08A1</span><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent"> is not at all an isolated case: aside from the other Arabic characters cited there are indefinitely many other cases of sequences that are not canonically equivalent, but have "the same glyph".</span><br>




</div><div><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent"><br></span></div><div><span style="color:rgb(0,0,0);font-family:'times new roman',serif;background-color:transparent">The purpose of this is <i>not</i> to show that Vint is wrong; it is instead that miscommunication is causing some fundamental misunderstandings.</span></div>





</div><br></div><div style="font-family:'times new roman',serif;margin:0px;background-color:transparent"><a href="https://google.com/+MarkDavis" target="_blank">Mark</a></div>
<div style="font-family:'times new roman',serif;margin:0px;background-color:transparent"><i><br></i></div><div style="font-family:'times new roman',serif;margin:0px;background-color:transparent"><i>— Il meglio è l’inimico del bene —</i></div>





<div><div><font face="'times new roman', serif"><i><span style="font-style:normal"><i></i></span><i></i></i></font></div></div></div></div>
</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>