<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 4, 2017 at 2:28 AM, Alastair Houghton <span dir="ltr"><<a href="mailto:alastair@alastairs-place.net" target="_blank">alastair@alastairs-place.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">RFC 5893 seems pretty clear to me, and the problem really is that the test vectors (which come from <a href="http://unicode.org" rel="noreferrer" target="_blank">unicode.org</a>) seem (to me) to be incorrect.</blockquote><div><br></div><div><a href="https://tools.ietf.org/html/rfc5893#section-2">https://tools.ietf.org/html/rfc5893#section-2</a> says "<b><u>The following rule</u></b>, consisting of six conditions, <b><u>applies to labels</u></b> in Bidi domain names."</div><div><br></div><div>That's what the ICU code does -- applying the rule to each label -- and I assume that's the basis for the test data.</div><div><br></div><div>The latter part of this RFC section says that <b><u>if</u></b> certain conditions are met <b><u>for all labels, then</u></b> the domain name as a whole displays well.</div><div><br></div><div>ICU does not currently check for multi-label bidi combinations.</div><div><br></div><div>FYI the ICU checkLabelBiDi() code is currently <a href="http://bugs.icu-project.org/trac/browser/trunk/icu4j/main/classes/core/src/com/ibm/icu/impl/UTS46.java#L541">here</a> (Java version).</div><div><br></div><div>markus</div></div></div></div>