Mercurial > pidgin.yaz
changeset 11726:6e0986c82bc5
[gaim-migrate @ 14017]
g_utf8_validate() and g_convert() accept -1 as a length argument, so there's no need to call strlen() ourselves.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 22 Oct 2005 22:58:16 +0000 |
parents | 743b574c81b9 |
children | 8657ad65e257 |
files | src/protocols/irc/parse.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/irc/parse.c Sat Oct 22 22:38:00 2005 +0000 +++ b/src/protocols/irc/parse.c Sat Oct 22 22:58:16 2005 +0000 @@ -251,10 +251,10 @@ charset++; if (!strcasecmp("UTF-8", charset)) { - if (g_utf8_validate(string, strlen(string), NULL)) + if (g_utf8_validate(string, -1, NULL)) utf8 = g_strdup(string); } else { - utf8 = g_convert(string, strlen(string), "UTF-8", charset, NULL, NULL, NULL); + utf8 = g_convert(string, -1, "UTF-8", charset, NULL, NULL, NULL); } if (utf8) {