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:
nhotta%netscape.com 2002-03-08 20:12:52 +00:00
Родитель c50bca002a
Коммит 4e0634bd7a
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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;