gdk_selection.c:sanitize_ctext is broken in 1.2.9
- From: Vlad Harchev <hvv hippo ru>
- To: gtk-devel-list gnome org
- Cc: Ivan Pascal <pascal info tsu ru>, gnome-i18n gnome org
- Subject: gdk_selection.c:sanitize_ctext is broken in 1.2.9
- Date: Tue, 13 Mar 2001 23:16:39 +0400 (SAMT)
Hi,
Users say that there are problems with russian strings in window titles under
XFree-4.0.2 and gtk-1.2.9 (I don't have XF-4.0.2 so I can't describe them) - I
was told that it's somehow severely corrupted. I guess same problems will
appear for any other non-latin1 locale.
The problem is in newly-introduced sanitize_ctext function.
Here is a hackish patch that fixes the problem for russian (it's not mine),
but it has (as Aleksey Novodvorsky <aen@logic.ru>, the author of the patch,
says) a problem of not filtering out some escape sequences that are
introduced by some very old XFree servers:
diff -ur gtk+-1.2.9.orig/gdk/gdkselection.c gtk+-1.2.9/gdk/gdkselection.c
--- gtk+-1.2.9.orig/gdk/gdkselection.c Tue Feb 20 19:44:22 2001
+++ gtk+-1.2.9/gdk/gdkselection.c Sun Mar 4 15:26:05 2001
@@ -222,7 +222,9 @@
else if (c == '\n' || c == '\t' || c == 27 /* ESC */ ||
(c >= 32 && c <= 127) || /* GL */
c == 155 /* CONTROL SEQUENCE INTRODUCER */ ||
- (c >= 160 && c <= 255)) /* GR */
+ (c >= 160 && c <= 255) /* GR */ ||
+ (c >= 128 && c <= 150) /* charset length */ ||
+ c == 2 /* end of non-standard encoding sequence */)
{
result[out_length++] = c;
}
I have been told that complete description of escape sequences supported by
XFree is only available in russian though. Ivan Pascal <pascal@info.tsu.ru> is
the author of that documentation, and I hope that he will help to explain how
to rewrite sanize_ctext in order to be correct.
It would be nice if this issue was fixed before 1.2.10 release..
PS: Ivan, could you fix that function (or gdkselection.c) yourself?
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]