Re: g_malloc overhead



Am Montag, den 26.01.2009, 12:40 +0100 schrieb MartÃn Vales:
Paul LeoNerd Evans escribiÃ:
On Sun, 18 Jan 2009 17:43:57 +0100
MartÃn Vales <martin opengeomap org> wrote:

  
Other overhead i see is the open dir/file funtions, where in windows we 
need do the utf8 to utf16 everytime in windows. If JAVA,.NET and Qt use 
utf16 by default why in gnome world we use utf8 by default?.
    

Probably one of the biggest reasons, is that UTF-8 does not use \0
octets, whereas UTF-16 does. This means that UTF-8 data can transparently
pass through all of the usual str*() functions in C, such as strlen(),
strcpy(), etc...

  
I can see the advantages of use utf8 but the true itÂs most of people 
use utf16. I know gnome/linux/cairo/freedesktop promote utf8 but most 
people use utf16:
http://unicode.org/notes/tn12/#Software_16

Currently C doesn't support for UTF-16 literals. The wchar_t type is 32
bits on Linux. So instead of:

        do_something ("abc")

you'd suddenly have to write:

        const utf16_t abc_literal[] = { 65, 66, 67, 0 }; /* "abc" */
        do_something (abc_literal);

I really don't see how this would help.

Ciao,
Mathias
-- 
Mathias Hasselmann <mathias hasselmann gmx de>
Personal Blog: http://taschenorakel.de/mathias/
Openismus GmbH: http://www.openismus.com/




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