ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] Re: gdk_selection.c:sanitize_ctext is broken in 1.2.9 (fwd)
@ 2001-03-14  7:18 Vlad Harchev
  2001-03-14  9:58 ` Vlad Harchev
  0 siblings, 1 reply; 2+ messages in thread
From: Vlad Harchev @ 2001-03-14  7:18 UTC (permalink / raw)
  To: sisyphus

 Hi, 

 Наверно надежда есть что это будет исправлено в 1.2.10 (который выйдет часов
через 8).

 Best regards,
  -Vlad

---------- Forwarded message ----------
Date: 13 Mar 2001 16:19:47 -0500
From: Owen Taylor <otaylor@redhat.com>
Cc: Vlad Harchev <hvv@hippo.ru>, Ivan Pascal <pascal@info.tsu.ru>
To: gtk-devel-list@gnome.org
Subject: Re: gdk_selection.c:sanitize_ctext is broken in 1.2.9
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7


Vlad Harchev <hvv@hippo.ru> writes:

>  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;
>         }

OK, looking again at the Xlib code and the CTEXT spec, it appears that
the CTEXT spec was at some point extended to accomodate this (section
6) but the initial section that describes what characters are allowed
was never updated :-(.

Unfortunately, according to the spec, anything is allowed in an
extended segment, including all of C0 and C1, so probably we need to
add explicit recognition of extended segments to sanitize_ctext().

Or, since since sanitize_ctext is only a workaround for buggy Xlib
(like XFree86 3.x, etc), I suppose the patch to add it could just be
backed out.

>  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. 

I almost think that I need to learn Russian because Ivan has produced
all this great documentation about Xkb and CText and so forth that I
can't read! ;-)

But actually, the code in Xlib appears to correspond pretty well with
the CTEXT spec in the X distribution, and Bruno Haible has even
updated the CTEXT spec a bit recently to make the correspondence
closer.

>  It would be nice if this issue was fixed before 1.2.10 release..

I'll make sure that happens.

Regards,
                                        Owen




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sisyphus] Re: gdk_selection.c:sanitize_ctext is broken in 1.2.9 (fwd)
  2001-03-14  7:18 [sisyphus] Re: gdk_selection.c:sanitize_ctext is broken in 1.2.9 (fwd) Vlad Harchev
@ 2001-03-14  9:58 ` Vlad Harchev
  0 siblings, 0 replies; 2+ messages in thread
From: Vlad Harchev @ 2001-03-14  9:58 UTC (permalink / raw)
  To: sisyphus

On Wed, 14 Mar 2001, Vlad Harchev wrote:

 И кстати если эта проблема не будет исправлена, нельзя будет
вырезать/вставлять русский в ЛЮБОЙ ВИДЖЕТ не-патченного gtk-1.2.{9,10}. Просто
повезло что Алексей обмолвился об этой проблеме в gtk-1.2.9 в этом списке и
что я развил эту тему.

 Мораль - господа разработчики, своевременно сообщайте авторам об ошибках
хотя бы в критических компонентах.

>  Hi, 
> 
>  Наверно надежда есть что это будет исправлено в 1.2.10 (который выйдет часов
> через 8).
> 
>  Best regards,
>   -Vlad
> 
> ---------- Forwarded message ----------
> Date: 13 Mar 2001 16:19:47 -0500
> From: Owen Taylor <otaylor@redhat.com>
> Cc: Vlad Harchev <hvv@hippo.ru>, Ivan Pascal <pascal@info.tsu.ru>
> To: gtk-devel-list@gnome.org
> Subject: Re: gdk_selection.c:sanitize_ctext is broken in 1.2.9
> User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
> 
> 
> Vlad Harchev <hvv@hippo.ru> writes:
> 
> >  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;
> >         }
> 
> OK, looking again at the Xlib code and the CTEXT spec, it appears that
> the CTEXT spec was at some point extended to accomodate this (section
> 6) but the initial section that describes what characters are allowed
> was never updated :-(.
> 
> Unfortunately, according to the spec, anything is allowed in an
> extended segment, including all of C0 and C1, so probably we need to
> add explicit recognition of extended segments to sanitize_ctext().
> 
> Or, since since sanitize_ctext is only a workaround for buggy Xlib
> (like XFree86 3.x, etc), I suppose the patch to add it could just be
> backed out.
> 
> >  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. 
> 
> I almost think that I need to learn Russian because Ivan has produced
> all this great documentation about Xkb and CText and so forth that I
> can't read! ;-)
> 
> But actually, the code in Xlib appears to correspond pretty well with
> the CTEXT spec in the X distribution, and Bruno Haible has even
> updated the CTEXT spec a bit recently to make the correspondence
> closer.
> 
> >  It would be nice if this issue was fixed before 1.2.10 release..
> 
> I'll make sure that happens.
> 
> Regards,
>                                         Owen
> 
> 
> _______________________________________________
> Sisyphus mailing list
> Sisyphus@linuxteam.iplabs.ru
> http://altlinux.ru/mailman/listinfo/sisyphus
> 

 Best regards,
  -Vlad




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-14  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-14  7:18 [sisyphus] Re: gdk_selection.c:sanitize_ctext is broken in 1.2.9 (fwd) Vlad Harchev
2001-03-14  9:58 ` Vlad Harchev

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git