[2] [DFN[Bidi [RUBYB[規則]@en[rule]]]]は、[[IDNラベル]]における [[bidi]] に関する制約です。

* 仕様書

[REFS[
-[1] [CITE@en[RFC 5893 - Right-to-Left Scripts for Internationalized Domain Names for Applications (IDNA)]] ([TIME[2011-02-05 07:34:27 +09:00]] 版) <https://tools.ietf.org/html/rfc5893>
- [10] [CITE@en-us[UTS #46: Unicode IDNA Compatibility Processing]] ([TIME[2017-06-15 06:37:47 +09:00]]) <http://www.unicode.org/reports/tr46/#Processing>
]REFS]

* 文脈

[4] [[IDNA2008]] で使われます。

[12] [[ラベル]]の[[妥当性基準]]で使われます。

[5] [[PRECIS]] の[[プロファイル]]でも採用できます。

* [VAR[CheckBidi]] フラグ

[11] [[ToASCII]] と [[ToUnicode]] の[[入力]] [DFN[[VAR[CheckBidi]]]] [SRC[>>10]]
は、[[bidi規則]]の適用の可否を指定する [[boolean]] の値です。

* 歴史

[3] [[IDNA2003]] では [[Stringprep]] の [[bidi]] に関する制約を適用していましたが、これでは表現できない語句が存在するため、
より細かい制約を規定するものとして [[IDNA2008]] で [[bidi規則]]が採用されました。

[FIG(quote)[
[FIGCAPTION[
[6] [CITE@en[RE: Standardizing on IDNA 2003 in the URL Standard]]
([[Shawn Steele]]著, [TIME[2014-01-20 03:53:50 +09:00]])
<https://lists.w3.org/Archives/Public/www-tag/2014Jan/0126.html>
]FIGCAPTION]

> Due to the changes in contextual/bidi validation, Windows’ client APIs dropped the additional context/bidi checks with IDNA2008 to forward-proof ourselves against other contextual/bidi rule changes.  As our APIs are intended for client side use, we expect that labels invalid by the rules would fail to be registered, so we’re depending on the existence of a DNS record to confirm whether that’s valid or not.  (Eg: we’re depending on the registrars to do the contextual/bidi validation when registering domains).

]FIG]


[7] [CITE@en[IDNA: use proposed UTS46 flags to avoid breaking YouTube]]
([[annevk]]著, [TIME[2017-06-02 06:24:01 +09:00]])
<https://github.com/whatwg/url/commit/dc9d83106cada9af507bf37dee3973de97b020fd>

[8] [CITE@en[IDNA / UTS #46 "should" requirements (Bidi and Joiners) · Issue #110 · whatwg/url]]
([TIME[2017-09-03 21:20:35 +09:00]])
<https://github.com/whatwg/url/issues/110>

[9] [CITE@en[Address several IDNA issues by annevk · Pull Request #309 · whatwg/url]]
([TIME[2017-09-03 21:25:46 +09:00]])
<https://github.com/whatwg/url/pull/309>