bug 275080 : cannot print (javascript : window) with a printer with non-Latin1 characters in its name : patch by masayuki (r=jshin, sr=bzbarsky)

git-svn-id: svn://10.0.0.236/trunk@189242 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jshin%mailaps.org
2006-02-07 01:14:57 +00:00
parent 07142d36b3
commit 15e84c806e

View File

@@ -912,8 +912,8 @@ nsPrinterEnumeratorWin::EnumeratePrinters(PRUint32* aCount, PRUnichar*** aResult
PRInt32 printerInx = 0;
while( count < numItems ) {
LPTSTR name = GlobalPrinters::GetInstance()->GetItemFromList(printerInx++);
nsString newName;
newName.AssignWithConversion(name);
nsAutoString newName;
NS_CopyNativeToUnicode(nsDependentCString(name), newName);
PRUnichar *str = ToNewUnicode(newName);
if (!str) {
CleanupArray(array, count);