Suppose you open a plain text file with only LTR text, e.g. the following single line: The quick brown fox jumped over the lazy dog. ... naturally, you expect the file to be opened in LTR direction. But - the direction is set according to the locale. If you use an LTR locale you'll get an LTR direction, even if the file has not a single char of RTL text.
(In reply to Eyal Rozenberg from comment #0) > If you use an LTR locale you'll > get an LTR direction, even if the file has not a single char of RTL text. If I understand this sentence correct, I don't see a problem here, or do you mean "even if the file has not a single char of LTR text"? => NEEDINFO
I mistyped. Let me rephrase: Suppose you open a plain text file with only LTR text; naturally, you expect the file to be opened in LTR direction. But if you set an RTL locale in LibreOffice, the file will be opened with an RTL direction, even if it has not a single character of RTL text.
(In reply to Eyal Rozenberg from comment #0) > Suppose you open a plain text file with only LTR text, e.g. the following > single line: > https://unblocked1games.github.io/ > The quick brown fox jumped over the lazy dog. > > ... naturally, you expect the file to be opened in LTR direction. But - the > direction is set according to the locale. If you use an LTR locale you'll > get an LTR direction, even if the file has not a single char of RTL text. Confirmed – plain LTR text should default to LTR, regardless of locale. Falling back to locale only when direction isn’t clear would make more sense.
How do you know whether the document continues with RTL text given the default PS is RTL following the locale settings? It's very likely IMO. Or let's think of the 'lazy fox' and add one RTL character, maybe an Aleph as list indicator. And what do you expect for the opposite, LTR locale receiving some الثعلب البني السريع text, hope this is correct, and Western/Latin default PS? Ultimately not a topic for UX but RTL people. Rather a duplicate of 162305 than blocking, and not related to file-opening.
(In reply to Heiko Tietze from comment #4) > How do you know whether the document continues with RTL text given the > default PS is RTL following the locale settings? It's very likely IMO. Actually, AFAICT, it is actually not likely for a text file starting with an LTR paragraph to be mostly-RTL. > Or > let's think of the 'lazy fox' and add one RTL character, maybe an Aleph as > list indicator. And what do you expect for the opposite, LTR locale > receiving some الثعلب البني السريع text, hope this is correct, and > Western/Latin default PS? This is actually a challenge I face in my Thunderbird extension for direction auto-detection. I cooked up a certain heuristic to make the decision, which I could elaborate if you like. > Ultimately not a topic for UX but RTL people. I will ask for input on the RTL Telegram channel. > Rather a duplicate of 162305 than blocking. There are three possibilities: 1. Use the LO locale regardless of anything. 2. Apply a heuristic to determine the direction of the first paragraph, ignore rest-of-documents. 3. Apply a heuristic to determine the direction of _each_ paragraph in the document, then either aggregate somehow (e.g. "any RTL paragraph -> RTL document", or "majority", or something accounting for the LO locale) or apply per-paragraph direction, as suggested in bug 162305. Now, bug 162305 is a heavy "ask", which is why I separated it. Option (3.) already takes a bit of work. But while we are undecided (or rejecting) option (3.), it is still better to use option (2.) as a cheap and rough heuristic, covering the most common cases better than we do now.