After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 124514 - Backspace removes base-character with combining-character
Backspace removes base-character with combining-character
Status: RESOLVED DUPLICATE of bug 119891
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-10-13 20:40 UTC by Behnam Esfahbod
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Not to delete Arabic marks with their base (1.09 KB, patch)
2004-01-21 13:22 UTC, Soheil Hassas Yeganeh
none Details | Review

Description Behnam Esfahbod 2003-10-13 20:40:46 UTC
- Type a Persian/Arabic text in any gnome app, like gedit.  sample: "سلام"
- Put a combining Persian/Arabic character at the end of it.  like: "ِ"
- Now press [BackSpace] key;  The combining character, and it's previus
character will be deleted.  The sample will be: "سلا" then.

In Persian/Arabic writing and typesetting, [BackSpace] only removes the
combining character, not anything else.

It's very important for Persian/Arabic input.
Comment 1 Owen Taylor 2003-10-13 21:13:24 UTC

*** This bug has been marked as a duplicate of 119891 ***
Comment 2 Soheil Hassas Yeganeh 2004-01-21 13:19:15 UTC
The patch below make pango not to delete arabic marks with their base.
It just sets log_attr.is_cursor_position  TRUE, for arabic marks.
Comment 3 Soheil Hassas Yeganeh 2004-01-21 13:22:44 UTC
Created attachment 23598 [details] [review]
Not to delete Arabic marks with their base
Comment 4 Owen Taylor 2004-01-21 15:35:16 UTC
Pango-1.3 has backspace_deletes_character, in PangoLogAttr
the correct change is to make GtkEntry and GtkTextView
respect that (And note this bug is resolved as a duplicate of a 
different bug)
Comment 5 Soheil Hassas Yeganeh 2004-01-22 07:57:32 UTC
Dear Owen,

For arabic marks the is_cursor_position have to be TRUE.
Because, when an arabic mark character is entered, they want the 
cursor to trace the marks too, not only the bases.

In other words, (to complete this bug,) now pango-1.3 
1- doesn't place the cursor for marks and place the cursor just for 
bases and,
2- it deletes marks with their bases.
So, I think making is_cursor_position TRUE is right for arabic, and 
when is_cursor_position is made true the backspace_deletes_character 
is made true, implicitly.

Best Regards
Comment 6 Behdad Esfahbod 2004-01-23 09:14:51 UTC
Soheil,

If you read Owen's comment again, it's a bug in Gtk now that does not
support (honor) backspace_deletes_character.  And no, I'm not sure if
Arabic marks should have cursor_position, but yes, that's the way the
other OS handles it.  Roozbeh?
Comment 7 Soheil Hassas Yeganeh 2004-01-23 09:50:14 UTC
Behdad,
By my comment, implicitly, I mean that pango should handle that. 
So, I complete my comment:
Pango has functions, providing cursor position of the given character 
index ( (.*)index_to_(x|pos) ) and some of them are using the 
log_attr values ( e.g. is_cursor_position ) to get the position of 
the given character index, so I think that Pango should handle such 
this thing not GTK. Owen?
Best Regards
Comment 8 Owen Taylor 2004-01-23 14:47:00 UTC
For most languages, you really don't want a cursor position
before marks / within clusters. So the backspace_deletes_character
logical attribute is needed. And backspace_deletes_character
is implemented in Pango, but its the GTK+ code that needs
to pay attention to it.

I don't know what the correct behavior is for Arabic where
the marks indicate vowels rather than modifying the base
character.

My concerns about putting a cursor position between the
vowel mark and base character are the following:
 
 - Pango's handling of cursor positioning is very 
   simple - the cursor just linearly advances through
   the cluster for each cursor position within it.
   I'm not sure it will be clear to the user what
   is going on without a fancier display of the cursor.

 - If the extra cursor position is there, the user
   is given many more ways of creating invalid combinations
   of mark without base character, and that will
   increase user confusion.

Let's get the backspace_deletes_character working for 
GTK+-2.3.3, see how Arabic-script  users like it, and then
consider whether we actually want to add extra cursor
positions.
Comment 9 Mehran Mehr 2004-01-24 05:43:53 UTC
Setting is_cursor_position is necessary for dotted-circle 
representation of combining-marks.

Suppose you've a Unicode string such as:

logicalOrder = [U+0627 U+064B U+064C]

according to dotted-circle rule of Unicode standard this string 
should be displayed visually as (G+XXXX = glyph of U+XXXX):

visualOrder = [G+06CC G+064C G+0627 G+064B]

Pango compute Logical Attributes for logicalOrder and there is no way 
other than setting the is_cursor_position of U+064C to indicate there 
is a cursor stop before the G+06CC
Comment 10 Behdad Esfahbod 2004-01-28 11:36:13 UTC
Mehran,

Seems like a good thing not to be able to stop before the implicit
dotted circle :).