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. Ciao, Mathias -- Mathias Hasselmann <mathias hasselmann gmx de> Openismus GmbH: http://www.openismus.com/ Personal Site: http://taschenorakel.de/
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil