CheckForPrintToFileWithName((char*)NS_ConvertUCS2toUTF8(aUPrinterName).get(), toFile);
CheckForPrintToFileWithName(NS_CONST_CAST(char*, NS_ConvertUCS2toUTF8(aUPrinterName).get()), toFile);
CheckForPrintToFile(nsIPrintSettings* aPS, LPTSTR aPrinterName, PRUnichar* aUPrinterName){  nsresult rv = NS_OK;  if (!aPrinterName && !aUPrinterName) return rv;  PRBool toFile;#ifdef UNICODE  CheckForPrintToFileWithName(aPrinterName?aPrinterName:aUPrinterName, toFile);#else  if (aPrinterName) {    CheckForPrintToFileWithName(aPrinterName, toFile);  } else {    CheckForPrintToFileWithName((char*)NS_ConvertUCS2toUTF8(aUPrinterName).get(), toFile);  }#endif  // Since the driver wasn't a "Print To File" Driver, check to see  // if the name of the file has been set to the special "FILE:"  if (!toFile) {    nsXPIDLString toFileName;    aPS->GetToFileName(getter_Copies(toFileName));    if (toFileName) {      if (*toFileName) {        if (toFileName.Equals(NS_LITERAL_STRING("FILE:"))) {          // this skips the setting of the "print to file" info below          // which we don't want to do.          return NS_OK;         }      }    }  }  aPS->SetPrintToFile(toFile);  if (toFile) {    rv = GetFileNameForPrintSettings(aPS);  }  return rv;}