Bug 228345 - BIDI3.4: Arabic text in command line of shell session is not ordered and not shaped correctly
Summary: BIDI3.4: Arabic text in command line of shell session is not ordered and not ...
Status: NEW
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Dykstal CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2008-04-23 03:59 EDT by Mohamed El-Kholy CLA
Modified: 2008-04-23 05:51 EDT (History)
3 users (show)

See Also:


Attachments
The green rectange shows the correct ordering and shaping of the text, while the red rectangle shows the incorrect order and shaping of Arabic text in command line (8.98 KB, image/jpeg)
2008-04-23 03:59 EDT, Mohamed El-Kholy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed El-Kholy CLA 2008-04-23 03:59:22 EDT
Created attachment 97167 [details]
The green rectange shows the correct ordering and shaping of the text, while the red rectangle shows the incorrect order and shaping of Arabic text in command line 

Build ID: I20080419

Steps To Reproduce:
1.In a RHEL terminal , set the variables LANG and LC_ALL to "ar_EG.utf8"
2.Start eclipse using the command ./eclipse -nl ar_EG
3.Create an RSE connection to a Linux machine which contains directories with Arabic names
4.Open a shell from the RSE connection and login to the Linux machine, browse until you reach to the Arabic named directory
5.Type cd ABCD where ABCD represents the Arabic name of the directory 
6.press Enter
7.The command is executed successfully but it is not typed correctly in the command line


More information:
The Arabic name is not shaped or ordered correctly correctly in the command line
Comment 1 Martin Oberhuber CLA 2008-04-23 04:07:26 EDT
This is interesting: you "blindly" typed the command, and even though it was incorrectly shown on the command line, it was correctly executed (and displayed).

The command shell input line is essentially an editor, and the command shell output is essentially a tableview. I assume that other editors work correctly, so it looks like there is something in the command shell input line that makes it misbehave in the BIDI case. That's surprising, since I do not think we change the underlying editor a lot.

I'm wondering what happens if you try Ctrl+Space to do filename completion with an incorrectly displayed Prefix? Does it work at all? are the suggestions correctly listed?

The IME as well as the internal unicode representation of the command seem to be OK, only the input line editor's presentation seems to fail.

Unfortunately I'm not an expert in BIDI, so I'm wondering if anybody could help here?
Comment 2 Mohamed El-Kholy CLA 2008-04-23 05:19:42 EDT
The ctrl+space works auto completes the directory name, but it is still displayed incorrectly (exactly as when typing it)
Most probably the reason behind this problem is that the reading order of the text in command line is right to left, while it seems to be left to right in the display window over it, I believe that making the command line reading order left-to-right will solve this issue as most of commands consist of Latin characters (except may be files and directories names) 

Comment 3 Martin Oberhuber CLA 2008-04-23 05:51:30 EDT
Do you think you can debug or probably fix this yourself? There are good instructions on getting set up on the TM FAQ:
http://wiki.eclipse.org/TM_and_RSE_FAQ#How_do_I_debug_a_problem_with_TM_.2F_RSE.3F