Re: Escaping in (#51382)



On 16 Mar 2001, Owen Taylor wrote:

> Bug 51382 points out that there is no way to indicate
> literal '/' characters in a GtkItemFactoryEntry.

that was a design decision i admit ;)

> (On a related topic, there is also a bug so that when 
> turning item factory strings entries into paths, 
> "/File/Add __" gets turned to "/File Add " not
> "/File Add _"

i highly suspect that that's a bug in the uline parsing code
you added ;)

> And a bug where gtk_item_factory_print_func doesn't
> handle an itemfactory entry containing literal \n.)

<shocked>
heck, what characters do people _not_ use in item factory
entries?

> We don't really have an escaping standard in GTK+:

that's not completely true, the item factory already does
C string like escapes for i think \", and besides that,
i'd count the rc-file parsing behaviour the "official"
standard... well, as official as you can get basically.

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

>  * GMarkup, and hence markup-labels, uses, XML/SGML
>    entities, so:
> 
>    "/_File/&#2f;var&#2f;log&#2f;messages"
> 
> I think the first one is probably a bit more expected
> and less unreadable so I'll suggest that we should do 
> that.

probably. though the first one is quite unreadable already ;)

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]