зеркало из https://github.com/mozilla/gecko-dev.git
Bug 469797 nsUserInfo::GetFullname assumes ASCII name on Linux based systems. r=bsmedberg
This commit is contained in:
Родитель
ad7af36959
Коммит
7f59975db5
|
@ -47,6 +47,7 @@
|
|||
#include "nsString.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
|
||||
/* Some UNIXy platforms don't have pw_gecos. In this case we use pw_name */
|
||||
#if defined(NO_PW_GECOS)
|
||||
|
@ -99,7 +100,10 @@ nsUserInfo::GetFullname(PRUnichar **aFullname)
|
|||
fullname.ReplaceSubstring("&", username.get());
|
||||
}
|
||||
|
||||
*aFullname = ToNewUnicode(fullname);
|
||||
nsAutoString unicodeFullname;
|
||||
NS_CopyNativeToUnicode(fullname, unicodeFullname);
|
||||
|
||||
*aFullname = ToNewUnicode(unicodeFullname);
|
||||
|
||||
if (*aFullname)
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче