[alreq] What tools can be used for writing HTML source code with bidi text?

r12a has just created a new issue for https://github.com/w3c/alreq:

== What tools can be used for writing HTML source code with bidi text? ==
Writing HTML source code with bidi text is difficult, since the angle brackets, ampersands, quote marks and element/attribute names, etc. get mixed up in a RTL environment. (See https://www.w3.org/TR/2014/NOTE-i18n-html-tech-bidi-20140603/#bidisource)

Some solutions that may make sense for just short amounts of bidi text.

1. Many people writing bidi source code put the RTL content on a separate line from the start tag, eg. 
text goes here

One thing to watch here, however, is that you shouldn't have a closing tag on the next line if the openining tag has dir=rtl, since there can be problems with spaces (see https://www.w3.org/International/questions/qa-bidi-space)

2. At least one person i know uses an editor that doesn't know anything about the Unicode bidi algorithm or RTL support.  He writes short lengths of text in the normal Unicode order, but of course has to read them backwards (ie. LTR) in the source code itself.

3. You could also use character escapes, such as in

<p dir="rtl">&#x0646;&#x0634;&#x0627;&#x0637; &#x0627;&#x0644;&#x062A;&#x062F;&#x0648;&#x064A;&#x0644;&#x060C; W3C</p>

(https://r12a.github.io/app-conversion/ may help there)

**My main question is:
What editors support HTML source code editing, so that the markup doesn't get scrambled?**

Please view or discuss this issue at https://github.com/w3c/alreq/issues/194 using your GitHub account

Received on Monday, 8 October 2018 10:56:20 UTC