Bug 317926, Bookmark manager's localized title is not displayed properly. Throw strings around in UTF-8. Original patch by <waveridervsnrz@yahoo.co.jp>, thanks also to Torben and biesi. Camino-only, npotdb. r=smfr

This commit is contained in:
mark%moxienet.com 2005-11-29 15:59:41 +00:00
parent 5d6ea27dc0
commit 537e3c4829

View File

@ -68,11 +68,14 @@ nsAboutBookmarks::NewChannel(nsIURI *aURI, nsIChannel **result)
[sourceString assignTo_nsAString:pageSource];
nsCOMPtr<nsIInputStream> in;
rv = NS_NewStringInputStream(getter_AddRefs(in), pageSource);
if (NS_FAILED(rv)) return rv;
rv = NS_NewCStringInputStream(getter_AddRefs(in),
NS_ConvertUTF16toUTF8(pageSource));
NS_ENSURE_SUCCESS(rv, rv);
rv = NS_NewInputStreamChannel(&channel, aURI, in, NS_LITERAL_CSTRING("text/html"));
if (NS_FAILED(rv)) return rv;
rv = NS_NewInputStreamChannel(&channel, aURI, in,
NS_LITERAL_CSTRING("text/html"),
NS_LITERAL_CSTRING("UTF8"));
NS_ENSURE_SUCCESS(rv, rv);
*result = channel;
return rv;