Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Havoc Pennington
Hi, On Wed, Oct 8, 2008 at 11:00 PM, Behdad Esfahbod <[EMAIL PROTECTED]> wrote: > Lemme pull a real-world example: Last year I had to fix a bug in Firefox where > a page with a nul byte crashed the browser. What I don't see is how a nul byte is in any way different from an invalid sequence, other

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Behdad Esfahbod
Havoc Pennington wrote: > Hi, > > On Tue, Oct 7, 2008 at 5:50 PM, Brian J. Tarricone <[EMAIL PROTECTED]> wrote: >> I think what he really meant (or if not, here's my take on it) was that NUL >> bytes aren't *printable* text... like you'd say of low-value ASCII data. >> Sure, it's technically "tex

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Behdad Esfahbod
Behdad Esfahbod wrote: > Dan Winship wrote: >> Maciej Katafiasz wrote: >>> Den Tue, 07 Oct 2008 16:55:29 -0400 skrev Behdad Esfahbod: Ugh. Why is that? Who knows? Matthias suggested that because a string claiming to be length bytes long but terminating prematurely is not valid. Ho

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Behdad Esfahbod
Dan Winship wrote: > Maciej Katafiasz wrote: >> Den Tue, 07 Oct 2008 16:55:29 -0400 skrev Behdad Esfahbod: >>> Ugh. Why is that? Who knows? Matthias suggested that because a string >>> claiming to be length bytes long but terminating prematurely is not >>> valid. However, that statement assumes

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Dan Winship
Maciej Katafiasz wrote: > Den Tue, 07 Oct 2008 16:55:29 -0400 skrev Behdad Esfahbod: >> Ugh. Why is that? Who knows? Matthias suggested that because a string >> claiming to be length bytes long but terminating prematurely is not >> valid. However, that statement assumes that string is nul-termin

Re: Force containers to be list-like

2008-10-08 Thread BJörn Lindqvist
2008/10/8 Xavier Bestel <[EMAIL PROTECTED]>: > On Tue, 2008-10-07 at 21:52 +, BJörn Lindqvist wrote: >> In the future (3.0 maybe?) it would be cool if there was a Sequence >> interface that container widgets could implement. That way it would be >> more explicit how containers should be impleme

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Behdad Esfahbod
Maciej Katafiasz wrote: >>> Another possibility mentioned was making more use of GString. >> Not a huge fan. > > Why's that? GString is a very odd animal, we have it, it works fine and > is as good a string implementation and as compatible with char* as > possible within C, yet it seems to be us

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Sven Herzberg
Hi, Am Donnerstag, den 09.10.2008, 00:01 + schrieb Maciej Katafiasz: > Den Tue, 07 Oct 2008 16:55:29 -0400 skrev Behdad Esfahbod: > > coda wrote: > >> Another possibility mentioned was making more use of GString. > > > > Not a huge fan. > > Why's that? GString is a very odd animal, we have i

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Maciej Katafiasz
Den Tue, 07 Oct 2008 16:55:29 -0400 skrev Behdad Esfahbod: > coda wrote: >> I discussed this on #gtk+ with mathrick and pbor and it seems that the >> assumption that UTF-8 strings are NUL-terminated and contain no NULs >> runs pretty deep. A possible solution is to use "modified UTF-8" ( >> http:/

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Nikolai Weibull
On Wed, Oct 8, 2008 at 13:20, Havoc Pennington <[EMAIL PROTECTED]> wrote: > On Tue, Oct 7, 2008 at 5:50 PM, Brian J. Tarricone <[EMAIL PROTECTED]> wrote: >> I think what he really meant (or if not, here's my take on it) was that NUL >> bytes aren't *printable* text... like you'd say of low-value

Re: Gtk3 and theming - a proposal (with code)

2008-10-08 Thread Robert Staudinger
On Wed, Oct 8, 2008 at 3:50 PM, Xavier Bestel <[EMAIL PROTECTED]> wrote: [...] > there's another project called [1]Manju (also with code [2]available), > which seems to use SVG instead of CSS. Could you comment on the > differences between these approaches, if you know them ? Quoting from [1]:

Re: Gtk3 and theming - a proposal (with code)

2008-10-08 Thread Xavier Bestel
Hi, On Wed, 2008-10-08 at 11:36 +0200, Robert Staudinger wrote: > This should provide some insight on what I'm up to. Let me know what > you think, and maybe the Dublin hackfest can be used to bring things > on track. there's another project called [1]Manju (also with code [2]available), which s

Re: g_utf8_validate() and NUL characters

2008-10-08 Thread Havoc Pennington
Hi, On Tue, Oct 7, 2008 at 5:50 PM, Brian J. Tarricone <[EMAIL PROTECTED]> wrote: > I think what he really meant (or if not, here's my take on it) was that NUL > bytes aren't *printable* text... like you'd say of low-value ASCII data. > Sure, it's technically "text," but most of it isn't somethin

Gtk3 and theming - a proposal (with code)

2008-10-08 Thread Robert Staudinger
Hello, After the CSS engine [1] has gained some traction -- at least in terms of code -- I'd like to lay out a possible plan for theming in gtk3. First up, some (well known) issues to consider: (1) "Suboptimal Theming in GTK" [2] (2) "Themes are Evil!" [3, 4] (3) Lookalike widget/toolkit im

Re: Force containers to be list-like

2008-10-08 Thread Xavier Bestel
On Tue, 2008-10-07 at 21:52 +, BJörn Lindqvist wrote: > In the future (3.0 maybe?) it would be cool if there was a Sequence > interface that container widgets could implement. That way it would be > more explicit how containers should be implemented. And other > list-like widgets could also imp