Re: Escaping in (#51382)
- From: Tim Janik <timj gtk org>
- To: Owen Taylor <otaylor redhat com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Escaping in (#51382)
- Date: Sun, 18 Mar 2001 05:04:58 +0100 (CET)
On 17 Mar 2001, Owen Taylor wrote:
>
> Tim Janik <timj gtk org> writes:
>
> > > > > * GScanner and hence RC files support C-string like
> > > > > escaping with \n \r \t \b \f and octal escapes.
> > > > >
> > > > > This would imply:
> > > > >
> > > > > "/_File/\\/var\\/log\\/messages"
> > > >
> > > > we don't actually have an option here, the item factory
> > > > dumps are supposed to be GScanner parsable, so we'll have
> > > > to use this style.
> > >
> > > OK, I'll do that then.
> >
> > that's not much, i.e. it shouldn't be more than just:
>
> > + name = g_strescape (string, NULL);
> > + g_free (string);
> > + string = name;
> > data->print_func (data->func_data, string);
>
> Well, considering that g_strescape() mangles UTF-8 pretty
> badly, I just wrote my own escaper in a few lines.
urg, i'm using that in a couple other places as well, what's the
problem here?
> Complete patch to:
>
> - Allow / in GtkItemFactory
> - Escape \n and " when dumping accelerators
> - Fix problem with __ in item factory paths
>
> is attached. With all the typical ugliness of multiple levels
> of escaping, of course.
glancing over it, it looks pretty good to me.
>
> Regards,
> Owen
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]