зеркало из https://github.com/mozilla/pjs.git
urg, backing out, this breaks attaching files with non-ascii names on non-windows platforms
This commit is contained in:
Родитель
8a87e924dd
Коммит
3abe47f3a5
|
@ -3517,8 +3517,16 @@ nsresult nsMsgCompose::AttachmentPrettyName(const char* url, PRUnichar** _retval
|
|||
char * leafName = fileSpec.GetLeafName();
|
||||
if (leafName && *leafName)
|
||||
{
|
||||
/* file URL is now in UTF-8 */
|
||||
*_retval = ToNewUnicode(NS_ConvertUTF8toUCS2(leafName));
|
||||
#ifdef MOZ_UNICODE
|
||||
/* file URL is now in UTF-8 */
|
||||
*_retval = ToNewUnicode(NS_ConvertUTF8toUCS2(leafName));
|
||||
#else
|
||||
nsAutoString tempStr;
|
||||
nsresult rv = ConvertToUnicode(nsMsgI18NFileSystemCharset(), leafName, tempStr);
|
||||
if (NS_FAILED(rv))
|
||||
tempStr.AssignWithConversion(leafName);
|
||||
*_retval = ToNewUnicode(tempStr);
|
||||
#endif /* MOZ_UNICODE */
|
||||
nsCRT::free(leafName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче