зеркало из https://github.com/mozilla/pjs.git
For printing all cards, changed to generate UTF-8 .xml instead of UCS2,
bug 123018, r=bhuvan, sr=sspitzer, a=asa.
This commit is contained in:
Родитель
c50bca002a
Коммит
4e0634bd7a
|
@ -128,11 +128,12 @@ nsAddbookProtocolHandler::GenerateXMLOutputChannel( nsString &aOutput,
|
|||
nsresult rv = NS_OK;
|
||||
nsIChannel *channel;
|
||||
nsCOMPtr<nsIInputStream> inStr;
|
||||
NS_ConvertUCS2toUTF8 utf8String(aOutput.get());
|
||||
|
||||
rv = NS_NewStringInputStream(getter_AddRefs(inStr), aOutput);
|
||||
rv = NS_NewCStringInputStream(getter_AddRefs(inStr), utf8String);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, inStr, "text/xml", aOutput.Length());
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, inStr, "text/xml", utf8String.Length());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*_retval = channel;
|
||||
|
|
Загрузка…
Ссылка в новой задаче