From 15e84c806e8d052d35a229a35deaea3423e87cab Mon Sep 17 00:00:00 2001 From: "jshin%mailaps.org" Date: Tue, 7 Feb 2006 01:14:57 +0000 Subject: [PATCH] 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 --- mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp b/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp index b34936dfaf1..381060fb291 100644 --- a/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp +++ b/mozilla/widget/src/windows/nsDeviceContextSpecWin.cpp @@ -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);