Re: g_malloc overhead


Well - what do you mean? Having 2 functions - one reciving utf-16 and
one utf-8? To be honest - it doesn't make any sense to me (it would
create much mess, double the code, make programming errors easier...).

Converting? What's wrong with g_utf16_to_utf8?
I was talking about a full utf16 and utf8 api in glib and use a macro to work work intermediate string:

For example in windows they have this types:
LPSTR =char *
LPWSTR= utf16windowschar *

... and:
LPTSTR type. If we defined the _UNICODE macro is LPWSTR else LPSTR .

,...after they have a full api to manage utf16 and ansi strings, (strcat, strcpy, etc),
... and finally macros to use string in the same way _TEXT _T, etc.

_TEXT("are you defined _UNICODE macro?. Perhaps i am ansi or perhaps utf16") <>

perhaps in glib we could have utf16 and utf8 in that way or am i wrong?


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