-
-
Notifications
You must be signed in to change notification settings - Fork 35
Add bidi support and address UAX31/UTS55 requirements #884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
82fcef3
c5baba6
ca63819
1e172fd
afd5ef0
c7a41fc
b0cd0a5
cacc5e9
1fb0f92
a79fb8d
86a20f8
768a8a8
fd9fc57
734ef49
4541758
d751181
cbd0457
0df963e
be8fa43
f110af7
d8c6d0f
d5fb3bb
82af41f
d9d79bc
7858961
e7aa24c
86fc1d4
d5303c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -733,7 +733,13 @@ A **_<dfn>name</dfn>_** is a character sequence used in an _identifier_ | |
or as the name for a _variable_ | ||
or the value of an _unquoted literal_. | ||
|
||
_Variable_ names are prefixed with `$`. | ||
A _name_ can be preceded or followed by bidirectional marks or isolating controls | ||
to aid in presenting names that contain right-to-left or neutral characters. | ||
These characters are **not** part of the _name_ and MUST be treated as if they were not present | ||
when matching _name_ or _identifier_ strings or _unquoted literal_ values. | ||
Implementations MAY remove these characters from a _message_. | ||
aphillips marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
_Variable_ _names_ are prefixed with `$`. | ||
|
||
Valid content for _names_ is based on <cite>Namespaces in XML 1.0</cite>'s | ||
[NCName](https://www.w3.org/TR/xml-names/#NT-NCName). | ||
|
@@ -773,10 +779,10 @@ option = identifier owsp "=" owsp (literal / variable) | |
|
||
identifier = [namespace ":"] name | ||
namespace = name | ||
name = name-start *name-char | ||
name = [bidi] name-start *name-char [bidi] | ||
name-start = ALPHA / "_" | ||
/ %xC0-D6 / %xD8-F6 / %xF8-2FF | ||
/ %x370-37D / %x37F-1FFF / %x200C-200D | ||
/ %x370-37D / %x37F-61B / %x61D-1FFF / %x200C-200D | ||
/ %x2070-218F / %x2C00-2FEF / %x3001-D7FF | ||
/ %xF900-FDCF / %xFDF0-FFFC / %x10000-EFFFF | ||
name-char = name-start / DIGIT / "-" / "." | ||
|
@@ -834,14 +840,14 @@ _option values_, and _keys_) | |
_Messages_ that contain right-to-left (aka RTL) characters SHOULD use one of the | ||
following mechanisms to make messages display intelligibly in plain-text editors: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before getting much deeper into discussing the mechanisms, could you clarify if this is intended to be the canonical/recommended way of isolating or marking messages with RTL contents that we've discussed, or is that something that'll be provided separately? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, that's separate. |
||
|
||
1. Use paired isolating bidi controls `U+2066 LEFT-TO-RIGHT ISOLATE` | ||
and `U+2069 POP DIRECTIONAL ISOLATE` as permitted by the ABNF around | ||
1. Use paired isolating bidi controls `U+2066 LEFT-TO-RIGHT ISOLATE` ("LRI") | ||
and `U+2069 POP DIRECTIONAL ISOLATE` ("PDI") as permitted by the ABNF around | ||
parts of any _message_ containing RTL characters: | ||
- _inside_ of _placeholder_ markers `{` and `}` | ||
- _outside_ _quoted-pattern_ markers `{{` and `}}` | ||
- _identifiers_ | ||
- _literals_ (This is especially important for individual _keys_ in a _variant_) | ||
- _option_ values | ||
- _outside_ of _literals_, paying particular attention to _keys_ in a _variant_ | ||
- _outside_ of _variable_, _function_, _markup_, or _attribute_ _names_/_identifiers_, | ||
including the identifying sigil (e.g. `<LRI>$var</PDI>` or `<LRI>:ns:name</PDI>`) | ||
aphillips marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Use the 'local-effect' bidi marks | ||
`U+061C ARABIC LETTER MARK`, `U+200E LEFT-TO-RIGHT MARK` or | ||
`U+200F RIGHT-TO-LEFT MARK` as permitted by the ABNF before or after _identifiers_, | ||
|
Uh oh!
There was an error while loading. Please reload this page.