-
Notifications
You must be signed in to change notification settings - Fork 31
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
What tools can be used for writing HTML source code with bidi text? #194
Comments
Two general matters:
Basically, IMHO, without specifically managing Bidi Context in every single component (like an HTML tag and text nodes), there's no way to get anything working properly. Based on that, I'm not fan of any recommendations like "add an LRM here" or "drop an ALM there" kinds of recommendations. |
Totally agree with @behnam here. As a data point, I know one XML editor that seems to get this right by separating the tags from the content, though I have only tried it once: https://www.oxygenxml.com/xml_editor/unicode_and_internationalization.html. I think this approach can even be used without turning XML tags into widgets. |
I wasn't thinking of writing this up in alreq at all. Just asking a question. This group being an obvious place to get some answers. |
That was my understanding of the question. BTW, presenting source without Bidi has a "hidden" questions: which form of an Arabic character to use when presented in memory order? Isolated or joined shape? In this case, the first line above might seem more "acceptable" than the second one. The problem with the latter case is that it may make use of the presentation-form of the letters. (Could it be otherwise?) |
Closing this since the discussion is no longer active. Feel free to add further comments, or reopen as needed. |
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.
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)
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.
You could also use character escapes, such as in
(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?
The text was updated successfully, but these errors were encountered: