Re: Deprecated functions



Hi,

"Richard Warren" <rew primagraphics co uk> writes:

> In this particular instance, I'm thinking of g_strncasecmp() in V1.3.9.

g_ascii_strncasecmp() is probably what you want to use instead.

g_strncasecmp() can't handle UTF-8 properly since there are 
multiple ways to express the same string in UTF-8. If you are
sure you are working with ASCII characters only, you should go
for g_ascii_strncasecmp(), otherwise you need to call
g_utf8_casefold() followed by g_utf8_collate(). As the documentation
for g_utf8_casefold() states, this is only a good approximation
to the correct linguistic case insensitive ordering.


Salut, Sven







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