Bug 1184936 - Need convert from UTF8 for printer name. r=karlt
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 09 Feb 2016 16:34:20 +0900
changeset 329787 a5f6e1f0e0e807a615f4f3ce1c395d60b0a1323d
parent 329786 c0b8f05a48d564dd81012d4c5e8239dec796c0f6
child 329788 35cdc40a44c45870ff5ba300ec504765eb87f0db
push id10611
push userdmitchell@mozilla.com
push dateTue, 09 Feb 2016 15:15:43 +0000
reviewerskarlt
bugs1184936
milestone47.0a1
Bug 1184936 - Need convert from UTF8 for printer name. r=karlt MozReview-Commit-ID: ClWYKm87idC
widget/gtk/nsPrintSettingsGTK.cpp
--- a/widget/gtk/nsPrintSettingsGTK.cpp
+++ b/widget/gtk/nsPrintSettingsGTK.cpp
@@ -475,17 +475,17 @@ nsPrintSettingsGTK::GetPrinterName(char1
       gtkPrintName = gtk_printer_get_name(mGTKPrinter);
     } else {
       // This mimics what nsPrintSettingsImpl does when we try to Get before we Set
       nsXPIDLString nullPrintName;
       *aPrinter = ToNewUnicode(nullPrintName);
       return NS_OK;
     }
   }
-  *aPrinter = ToNewUnicode(nsDependentCString(gtkPrintName));
+  *aPrinter = UTF8ToNewUnicode(nsDependentCString(gtkPrintName));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPrintSettingsGTK::SetPrinterName(const char16_t * aPrinter)
 {
   NS_ConvertUTF16toUTF8 gtkPrinter(aPrinter);