-
Notifications
You must be signed in to change notification settings - Fork 30
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
Replace textDirection property with recommendation for including control characters in the text #336
Comments
Merging from #335: The properties are not only for embedded strings (which in JSON we can expect to be unicode) but for arbitrary resources with URIs. I have no idea how PDFs store text strings (for example) and how well implemented the control characters are in those strings, but I can point you to many instances of older or just badly implemented XML documents in a huge variety of encodings. As these resources can take the role of the body of the Annotation, the unicode proposal isn't sufficient to address the requirements. For example:
Note that the properties are listed under External Web Resources [1], not under Embedded Textual Body [2] for just this reason. [1] https://www.w3.org/TR/annotation-model/#external-web-resources |
also merged from #335 ... #335 (comment) I see it exactly the opposite.
|
We can't assume that everything is in Unicode, and storing this information within the Annotation document does help with selection as @gsergiu points out. It should not go on the selector itself, as that would only effect the direction of selected text and say nothing about the original documents text direction. Given that we can't assume Unicode for external resources, we should keep |
@BigBlueHat why do you need the textDirection for external resources? What can you do with it except of proper text selection in selectors? (the annotation itself has nothing to do with the correct representation of external resources!) |
Discussed on the telco of 2016-08-05. The resolution was that there is no new information that wasn't already discussed. The proposal to use unicode control characters does not address the established need to cover non-unicode content, however much we might like to simply require unicode everywhere, retroactively. Whether the features are valuable is the subject of #335, and thus we're closing this issue as the concrete proposal does not cover established requirements. Thank you for the proposal and bearing with us through the process! |
@aaronpk On modern OS (i.e. Windows, iOS, Android) text direction is associated with text rendering. In the storage both text with LTR or RTL or Auto text direction is represented the same way. Thus relating to text direction is best when it is done during rendering phase. Unicode control characters or UCC (RLE, LRE etc .... ) are very valid means for enforcing text direction at rendering time and https://www.w3.org/International/questions/qa-bidi-unicode-controls indeed includes a lot of good use cases / examples. However, using UCC for turning text direction into storage level property is cumbersome. For example for several following reasons:
|
The
textDirection
property is an unproven theoretical solution to setting the base text direction. My understanding is it was added to this spec before it had any real implementation experience.Currently, there are solutions in Unicode string encoding itself that can accomplish setting the base text direction. Using the existing Unicode solution has the added benefit of being supported by many systems without them doing any extra work. There is a great article by the i18n group that covers a handful of control characters and describes how to use them to set the base text direction: https://www.w3.org/International/questions/qa-bidi-unicode-controls
My recommendation for the annotation spec is to drop the
textDirection
property and instead include a recommendation to use the appropriate control characters as necessary.The text was updated successfully, but these errors were encountered: