Bug 45147 - right-to-left words appear in the wrong order in the CSV import dialog
Summary: right-to-left words appear in the wrong order in the CSV import dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 RC1
Hardware: All Linux (All)
: high normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: CSV-Dialog RTL-UI
  Show dependency treegraph
 
Reported: 2012-01-23 12:31 UTC by Lior Kaplan
Modified: 2023-01-30 20:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
RTL CSV demo (88 bytes, text/csv)
2012-01-23 12:42 UTC, Lior Kaplan
Details
PDF export using 4.5 alpha from Jan 25th 2015 (16.05 KB, application/octetstream)
2015-01-27 15:46 UTC, Buovjaga
Details
screenshot (104.53 KB, image/png)
2015-01-27 17:44 UTC, Amir E. Aharoni
Details
Screenshot with appplied patch (56.14 KB, image/png)
2023-01-24 14:57 UTC, Andreas Heinisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lior Kaplan 2012-01-23 12:31:02 UTC
Reproduction:

1. Open the attached CSV document. The export wizard will appear.
2. Make sure that "Comma" is checked.
3. Make sure that "Character set" is "Unicode (UTF-8)".
4. Look at the columns at the bottom. The first and the second row have groups of the same four letters. In the first row there's a space in the middle of the string and in the second row the four letters are one string.

Here's the bug: in the first row the first two letters appear to the *left* of the last two letters. Since it's one RTL string, the first two letters are supposed to appear to the *right* of the last two letters. It's as if it would say "name Last" instead of "Last name".
Comment 1 Lior Kaplan 2012-01-23 12:42:50 UTC
Created attachment 56053 [details]
RTL CSV demo
Comment 2 Lior Kaplan 2012-01-23 12:43:48 UTC
Bug credit: Amir E. Aharoni (:
Comment 3 Urmas 2012-01-30 02:44:39 UTC
Lowering severity due to being a pure display issue.
Comment 4 Amir E. Aharoni 2012-01-30 02:54:18 UTC
OK it's suppose I is it issue display a of kind what understands everybody as long As :-)
Comment 5 Urmas 2012-02-07 22:53:52 UTC
After import the first cell contains RTL text "AB GD", "DG BA" in visual order. Import is done correctly, it's not a 'major' bug in any way.
Comment 6 Amir E. Aharoni 2012-02-08 01:35:13 UTC
After import it's indeed correct, broken it's import before but.

Sorry about repeating the jokes, but showing text in reverse anywhere is a major bug.
Comment 7 QA Administrators 2015-01-05 17:51:54 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2015-01-27 15:46:47 UTC
Created attachment 112829 [details]
PDF export using 4.5 alpha from Jan 25th 2015

Here's how it looks like in 4.5. Bug or not? I could not decide based on the original description, because it was so vague.

Win 7 Pro 64-bit Version: 4.5.0.0.alpha0+
Build ID: 784d069cc1d9f1d6e6a4e543a278376ab483d1eb
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-01-25_23:07:36
Comment 9 Amir E. Aharoni 2015-01-27 17:44:01 UTC
Created attachment 112833 [details]
screenshot

The bug is still there.

The import dialog is the thing that is broken.

See the attached screenshot.

The order of letters in row 1 and row 2 is supposed to be the same. The difference is supposed to be that the strings in row 1 are supposed to have a space in the middle.
Comment 10 QA Administrators 2016-02-21 08:36:24 UTC Comment hidden (obsolete)
Comment 11 Omer Zak 2017-11-01 23:03:39 UTC
The bug in the RTL CSV Text import dialog still happens in:

Version: 5.4.2.2.0+
Build ID: 1:5.4.2-3~bpo9+1
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.utf8); Calc: group

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)


By the way:
When I exported to a PDF file, the PDF file looked OK (also the attached PDF export using 4.5 alpha from Jan 25th 2015 looked OK).
Comment 12 Eyal Rozenberg 2018-09-17 16:46:39 UTC
Bug still manifests with:

Version: 6.1.1.2
Build ID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); Calc: group threaded
Comment 13 QA Administrators 2019-09-18 02:53:19 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2022-01-09 03:41:30 UTC Comment hidden (obsolete)
Comment 15 Eyal Rozenberg 2022-09-14 22:11:27 UTC
Bug still manifests with:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 6c81a09e3ef239a2d7a991d00fe3620a67298b99
CPU threads: 4; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Calc: threaded
Comment 16 Andreas Heinisch 2023-01-24 14:57:17 UTC
Created attachment 184879 [details]
Screenshot with appplied patch

If I remove the special handling for mixed script types, I have the following result. What do you think? By any means, I am not an RTL or a font expert :)
Comment 17 Commit Notification 2023-01-30 17:25:27 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a362c0145731031834bc3a73c8e3577bf6c12720

tdf#45147 - CSV Import: Remove special handling for mixed script types

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Eyal Rozenberg 2023-01-30 18:33:12 UTC
(In reply to Commit Notification from comment #17)
> Affected users are encouraged to test the fix and report feedback.

Will test when there's a nightly. But - are you sure removing that special handling has no detrimental effect on anything else?