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 95230 - drag & drop is broken with non-ASCII characters
drag & drop is broken with non-ASCII characters
Status: RESOLVED FIXED
Product: libzvt
Classification: Deprecated
Component: general
unspecified
Other opensolaris
: Normal normal
: ---
Assigned To: Havoc Pennington
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-10-08 23:55 UTC by Hidetoshi Tajima
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
convert data back to locale's encoding before sending to terminal (1.34 KB, patch)
2002-10-09 00:02 UTC, Hidetoshi Tajima
none Details | Review
back out the previous change with some comments (1.35 KB, patch)
2002-10-09 17:14 UTC, Hidetoshi Tajima
none Details | Review

Description Hidetoshi Tajima 2002-10-08 23:55:56 UTC
[Imported from Sun's bugtraq (#4754398)

gnome-terminal: drag&drop doew not work with non-ASCII characters -
characters are corrupted when drag from a drag-and-drop enabled app such as
CDE dtterm and drop 
into gnome-terminal.

To reproduce:
1) run gnome-terminal, dtterm
2) type some localized characters in dtterm
3) drag&drop them to gnome-terminal
4) see corrupted characters

Attaching a patch shortly - please review for
check-in approval for the both branches(gnome-2-0
and HEAD).
Comment 1 Hidetoshi Tajima 2002-10-09 00:02:55 UTC
Created attachment 11454 [details] [review]
convert data back to locale's encoding before sending to terminal
Comment 2 Havoc Pennington 2002-10-09 02:12:44 UTC
This patch looks good to commit to both branches, thanks a lot.
Comment 3 Hidetoshi Tajima 2002-10-09 02:49:36 UTC
commit to both branches with ChangeLog entry below.

	* src/terminal-screen.c (drag_data_received):
	convert drag&drop data back to locale's encoding before sending to
	terminal (#95230: drag&drop is broken with non-ASCII characters)
Comment 4 Nalin Dahyabhai 2002-10-09 15:34:02 UTC
I think this change should be reverted.  The XTerm spec provides
control sequences for switching into and out of UTF-8 mode (the
default is theoretically ISO-8859-1), and because gnome-terminal has
no way of knowing which mode the terminal is in (specifically that it
might not be using the same encoding glib expects), it must pass UTF-8
to the widget, and the widget must perform the correct conversion.
Comment 5 Havoc Pennington 2002-10-09 16:47:38 UTC
Nalin is right, we also have the issue of the "choose an encoding" menu 
on HEAD, that changes the encoding of the VTE widget. So only VTE
knows its current encoding. We should pass UTF-8 to the terminal widget.

For zvt, since it doesn't do anything clever, we can convert from
UTF-8 in terminal-widget-zvt.c.
Comment 6 Hidetoshi Tajima 2002-10-09 17:06:01 UTC
I see. Then, I'll back out the change from terminal-screen.c, and like
to convert from UTF-8
in zvtterm.c, instead of terminal-widget-zvt.c.
will apply this change to libzvt-i18n branch.
Comment 7 Hidetoshi Tajima 2002-10-09 17:14:18 UTC
Created attachment 11462 [details] [review]
back out the previous change with some comments
Comment 8 Hidetoshi Tajima 2002-10-09 17:45:13 UTC
Commit change to libzvt-i18n branch.