Re: GLib String support



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mathias Hasselmann wrote:
> Am Montag, den 11.08.2008, 12:53 +0100 schrieb adrian.dmc:
>> Hi...
>>
>> I included the ASCII only version to remove the overhead when dealing
>> with lowercasing, uppercasing, decimal or hexadecimal digits and
>> things like that from applications that really don't need to bring the
>> complexity of Unicode to them. As an example GTK signal strings could
>> only use the ASCII only string functions.
>>
>> About g_loc..., I completely agree that before using strings in other
>> code pages they should be, first, converted to UTF-8. (g_loc_...
>> dismissed.)
>> Following this g_loc.. approach: what about before converting between
>> UTF-8/16/32 use specific functions to validate each encoding forms,
>> removing the need to check for invalid code points/surrogate in each
>> of the conversion functions.
> 
> Hmm... Early validation of our strings, not that stupid. Here some
> starting port for brain storming:
> 
>         struct _GString
>         {
>           gchar  *str;
>           gsize len;    
>           gsize allocated_len;
>           gboolean tainted : 1;
>         };
> 
> Let's add the important g_utf8_ functions to g_string, and let them
> operate without validation when tainted is false.

First show me an example that validation shows up in profiles...


behdad


> Ciao,
> Mathias


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkigX2EACgkQn+4E5dNTERU9LwCfbzyYPDdwqCVwh4mMnV4R+YEA
JFkAn39ZXbl0cltRLjzep/mnUUxtnetE
=JBVA
-----END PGP SIGNATURE-----


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