NS_ConvertUTF8toUCS2 uscPath(path); const PRUnichar *strings[] = { uscPath.get() };
const PRUnichar *strings[] = { path.get() };
static void SendStatusChange(     ErrorType type, nsresult rv, nsIRequest *aRequest, nsIWebProgressListener *aListener, const nsACString &path){    nsAutoString msgId;    switch(rv)    {    case NS_ERROR_FILE_DISK_FULL:    case NS_ERROR_FILE_NO_DEVICE_SPACE:        // Out of space on target volume.        msgId = NS_LITERAL_STRING("diskFull");        break;    case NS_ERROR_FILE_READ_ONLY:        // Attempt to write to read/only file.        msgId = NS_LITERAL_STRING("readOnly");        break;    case NS_ERROR_FILE_ACCESS_DENIED:        // Attempt to write without sufficient permissions.        msgId = NS_LITERAL_STRING("accessError");        break;    default:        // Generic read/write/launch error message.        switch(type)        {        case kReadError:          msgId = NS_LITERAL_STRING("readError");          break;        case kWriteError:          msgId = NS_LITERAL_STRING("writeError");          break;        case kLaunchError:          msgId = NS_LITERAL_STRING("launchError");          break;        }        break;    }    // Get properties file bundle and extract status string.    nsCOMPtr<nsIStringBundleService> s = do_GetService(NS_STRINGBUNDLE_CONTRACTID);    if (s)    {        nsCOMPtr<nsIStringBundle> bundle;        if (NS_SUCCEEDED(s->CreateBundle("chrome://global/locale/nsWebBrowserPersist.properties", getter_AddRefs(bundle))))        {            nsXPIDLString msgText;            NS_ConvertUTF8toUCS2 uscPath(path);            const PRUnichar *strings[] = { uscPath.get() };            if(NS_SUCCEEDED(bundle->FormatStringFromName(msgId.get(), strings, 1, getter_Copies(msgText))))            {                aListener->OnStatusChange(nsnull, (type == kReadError) ? aRequest : nsnull, rv, msgText);            }        }    }}