Mercurial > pidgin.yaz
comparison src/protocols/bonjour/bonjour.c @ 13075:4b7a8787432c
[gaim-migrate @ 15437]
If the username in /etc/passwd is not utf8, don't write it to accounts.xml
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 30 Jan 2006 06:22:39 +0000 |
parents | 41ec0316cd65 |
children | a0dfbd5c3b03 |
comparison
equal
deleted
inserted
replaced
13074:27cd7d96a41a | 13075:4b7a8787432c |
---|---|
465 else if (((fullname = getlogin()) != NULL) && (fullname[0] != '\0')) | 465 else if (((fullname = getlogin()) != NULL) && (fullname[0] != '\0')) |
466 ; | 466 ; |
467 else | 467 else |
468 fullname = _("Gaim User"); | 468 fullname = _("Gaim User"); |
469 | 469 |
470 /* Make sure fullname is valid UTF-8. If not, try to convert it. */ | |
471 if (!g_utf8_validate(fullname, -1, NULL)) | |
472 { | |
473 gchar *tmp; | |
474 tmp = g_locale_to_utf8(fullname, -1, NULL, NULL, NULL); | |
475 if ((tmp == NULL) || (*tmp == '\0')) | |
476 fullname = _("Gaim User"); | |
477 } | |
478 | |
470 #else | 479 #else |
471 FARPROC myNetUserGetInfo = wgaim_find_and_loadproc("Netapi32.dll", | 480 FARPROC myNetUserGetInfo = wgaim_find_and_loadproc("Netapi32.dll", |
472 "NetUserGetInfo"); | 481 "NetUserGetInfo"); |
473 | 482 |
474 if (myNetUserGetInfo) { | 483 if (myNetUserGetInfo) { |