Bug 118137 - RTL: wrong direction when type numbers with slash
Summary: RTL: wrong direction when type numbers with slash
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL
  Show dependency treegraph
 
Reported: 2018-06-13 06:50 UTC by radwan hallak
Modified: 2024-08-03 09:15 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
screenshot for the correct and wrong direction (33.93 KB, image/jpeg)
2018-06-13 06:52 UTC, radwan hallak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description radwan hallak 2018-06-13 06:50:22 UTC
Description:
When I type numbers with slash / in Right To Left direction like date, The numbers appears from left to right.

This behavior is wrong because we are read the date or any numbers with slash from right to left in Arabic

this bug tested in:

Version: 5.4.5.1
Build ID: 79c9829dd5d8054ec39a82dc51cd9eff340dbee8
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group

Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: ar-JO (en_US); Calc: group

Version: 6.1.0.0.beta1 (x64)
Build ID: 8c76dfe1284e211954c30f219b3a38dcdd82f8a0
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: ar-SY (en_US); Calc: group

Steps to Reproduce:
1.tools - language settings - languages - set locale setting: Arabic ,then ok and restart office
2.press Ctrl+Shift+D OR Right-to-left icon to set RTL direction.
3.type 13/6/2018 or any numbers with slash

Actual Results:  
the numbers appears from left to right

Expected Results:
numbers must appears from right to left


Reproducible: Always


User Profile Reset: Yes



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Comment 1 radwan hallak 2018-06-13 06:52:05 UTC
Created attachment 142694 [details]
screenshot for the correct and wrong direction
Comment 2 radwan hallak 2018-06-14 05:29:48 UTC
I tested this bug in kubuntu linux 18.4 & kde neon.  because that I change operating system from Windows to all
Comment 3 ⁨خالد حسني⁩ 2018-06-16 15:54:53 UTC
That is the expected, by the spec, behavior of the slash characters with numbers. It might be unfortunate, but that what the Unicode Bidirectional Text algorithm mandates. MS Office is known to not follow the spec here.
Comment 4 radwan hallak 2018-06-17 04:35:51 UTC
thank you khaled
Comment 5 Fahad Al-Saidi 2018-06-27 05:18:42 UTC
>>MS Office is known to not follow the spec here.

It is the right thing to do BTW.
Comment 6 ⁨خالد حسني⁩ 2018-06-27 10:07:09 UTC
(In reply to Fahad Al-Saidi from comment #5)
> >>MS Office is known to not follow the spec here.
> 
> It is the right thing to do BTW.

The good thing about specs is that everyone follows them, otherwise copying text from another application (e.g. your web browser or text editor) is suddenly rendered differently.

It is not that hard to type the date in the order you want, BTW: ١٢/٣/١٩٧٨ is no easier than ١٩٧٨/٣/١٢.
Comment 7 Eyal Rozenberg 2019-02-17 20:42:57 UTC
(In reply to Khaled Hosny (inactive) from comment #3)
> That is the expected, by the spec, behavior of the slash characters with
> numbers. It might be unfortunate, but that what the Unicode Bidirectional
> Text algorithm mandates. MS Office is known to not follow the spec here.

What about when you just have a slash after a few digits with no other digits afterwards? i.e. the line is set to RTL, and let's say I even entered some strongly-RTL characters; then a space; then some digits; and now I type a slash. What does the UBA say about where that slash is supposed to appear?
Comment 8 ⁨خالد حسني⁩ 2019-02-18 15:53:17 UTC
(In reply to Eyal Rozenberg from comment #7)
> (In reply to Khaled Hosny (inactive) from comment #3)
> > That is the expected, by the spec, behavior of the slash characters with
> > numbers. It might be unfortunate, but that what the Unicode Bidirectional
> > Text algorithm mandates. MS Office is known to not follow the spec here.
> 
> What about when you just have a slash after a few digits with no other
> digits afterwards? i.e. the line is set to RTL, and let's say I even entered
> some strongly-RTL characters; then a space; then some digits; and now I type
> a slash. What does the UBA say about where that slash is supposed to appear?

You can try it yourself here https://unicode.org/cldr/utility/bidi.jsp.