From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 14 Mar 2001 13:58:12 +0400 (SAMT) From: Vlad Harchev X-Sender: hvv@localhost.localdomain To: sisyphus@linuxteam.iplabs.ru Subject: Re: [sisyphus] Re: gdk_selection.c:sanitize_ctext is broken in 1.2.9 (fwd) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=koi8-r Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: sisyphus-admin@linuxteam.iplabs.ru Errors-To: sisyphus-admin@linuxteam.iplabs.ru X-BeenThere: sisyphus@linuxteam.iplabs.ru X-Mailman-Version: 2.0 Precedence: bulk Reply-To: sisyphus@linuxteam.iplabs.ru List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Archived-At: List-Archive: List-Post: On Wed, 14 Mar 2001, Vlad Harchev wrote: =E9 =CB=D3=D4=C1=D4=C9 =C5=D3=CC=C9 =DC=D4=C1 =D0=D2=CF=C2=CC=C5=CD=C1 =CE= =C5 =C2=D5=C4=C5=D4 =C9=D3=D0=D2=C1=D7=CC=C5=CE=C1, =CE=C5=CC=D8=DA=D1 =C2= =D5=C4=C5=D4 =D7=D9=D2=C5=DA=C1=D4=D8/=D7=D3=D4=C1=D7=CC=D1=D4=D8 =D2=D5=D3=D3=CB=C9=CA = =D7 =EC=E0=E2=EF=EA =F7=E9=E4=F6=E5=F4 =CE=C5-=D0=C1=D4=DE=C5=CE=CE=CF=C7= =CF gtk-1.2.{9,10}. =F0=D2=CF=D3=D4=CF =D0=CF=D7=C5=DA=CC=CF =DE=D4=CF =E1=CC=C5=CB=D3=C5=CA =CF=C2=CD=CF=CC=D7=C9= =CC=D3=D1 =CF=C2 =DC=D4=CF=CA =D0=D2=CF=C2=CC=C5=CD=C5 =D7 gtk-1.2.9 =D7 = =DC=D4=CF=CD =D3=D0=C9=D3=CB=C5 =C9 =DE=D4=CF =D1 =D2=C1=DA=D7=C9=CC =DC=D4=D5 =D4=C5=CD=D5. =ED=CF=D2=C1=CC=D8 - =C7=CF=D3=D0=CF=C4=C1 =D2=C1=DA=D2=C1=C2=CF=D4=DE=C9= =CB=C9, =D3=D7=CF=C5=D7=D2=C5=CD=C5=CE=CE=CF =D3=CF=CF=C2=DD=C1=CA=D4=C5 = =C1=D7=D4=CF=D2=C1=CD =CF=C2 =CF=DB=C9=C2=CB=C1=C8 =C8=CF=D4=D1 =C2=D9 =D7 =CB=D2=C9=D4=C9=DE=C5=D3=CB=C9=C8 =CB=CF=CD=D0=CF= =CE=C5=CE=D4=C1=C8. > Hi,=20 >=20 > =EE=C1=D7=C5=D2=CE=CF =CE=C1=C4=C5=D6=C4=C1 =C5=D3=D4=D8 =DE=D4=CF =DC= =D4=CF =C2=D5=C4=C5=D4 =C9=D3=D0=D2=C1=D7=CC=C5=CE=CF =D7 1.2.10 (=CB=CF=D4= =CF=D2=D9=CA =D7=D9=CA=C4=C5=D4 =DE=C1=D3=CF=D7 > =DE=C5=D2=C5=DA 8). >=20 > Best regards, > -Vlad >=20 > ---------- Forwarded message ---------- > Date: 13 Mar 2001 16:19:47 -0500 > From: Owen Taylor > Cc: Vlad Harchev , Ivan Pascal > 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 >=20 >=20 > Vlad Harchev writes: >=20 > > Hi, > >=20 > > Users say that there are problems with russian strings in window title= s under > > XFree-4.0.2 and gtk-1.2.9 (I don't have XF-4.0.2 so I can't describe th= em) - I > > was told that it's somehow severely corrupted. I guess same problems wi= ll > > appear for any other non-latin1 locale. > > The problem is in newly-introduced sanitize_ctext function.=20 > >=20 > > Here is a hackish patch that fixes the problem for russian (it's not m= ine), > > but it has (as Aleksey Novodvorsky , the author of the pa= tch,=20 > > says) a problem of not filtering out some escape sequences that are > > introduced by some very old XFree servers: > >=20 > > diff -ur gtk+-1.2.9.orig/gdk/gdkselection.c gtk+-1.2.9/gdk/gdkselection= =2Ec > > --- 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 =3D=3D '\n' || c =3D=3D '\t' || c =3D=3D 27 /* ESC */= || > > (c >=3D 32 && c <=3D 127) || /* GL */ > > c =3D=3D 155 /* CONTROL SEQUENCE INTRODUCER */ || > > - (c >=3D 160 && c <=3D 255)) /* GR */ > > + (c >=3D 160 && c <=3D 255) /* GR */ || > > + (c >=3D 128 && c <=3D 150) /* charset length */ || > > + c =3D=3D 2 /* end of non-standard encoding sequence */) > > { > > result[out_length++] =3D c; > > } >=20 > 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 :-(. >=20 > 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(). >=20 > 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. >=20 > > I have been told that complete description of escape sequences support= ed by > > XFree is only available in russian though. Ivan Pascal is > > the author of that documentation, and I hope that he will help to expla= in how > > to rewrite sanize_ctext in order to be correct.=20 >=20 > 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! ;-) >=20 > 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. >=20 > > It would be nice if this issue was fixed before 1.2.10 release.. >=20 > I'll make sure that happens. >=20 > Regards, > Owen >=20 >=20 > _______________________________________________ > Sisyphus mailing list > Sisyphus@linuxteam.iplabs.ru > http://altlinux.ru/mailman/listinfo/sisyphus >=20 Best regards, -Vlad