printf("converting %s to %s\n",(const char *)prefval, (const char *)outval);
PRINTF("converting %s to %s\n",(const char *)prefval, (const char *)outval);
ConvertPrefToUTF8(const char *prefname, nsIPref *prefs, nsAutoString &charSet){    nsresult rv;    if (!prefname || !prefs) return NS_ERROR_FAILURE;#ifdef DEBUG_UTF8_CONVERSION     printf("converting %s to UTF8\n", prefname);#endif /* DEBUG_UTF8_CONVERSION */        nsXPIDLCString prefval;    rv = prefs->CopyCharPref(prefname, getter_Copies(prefval));    if (NS_FAILED(rv)) return rv;    if (!((const char *)prefval) || (PL_strlen((const char *)prefval) == 0)) {        // no need to convert ""        return NS_OK;    }    nsXPIDLCString outval;    rv = ConvertStringToUTF8(charSet, (const char *)prefval, getter_Copies(outval));    // only set the pref if the conversion worked, and it convert to something non null    if (NS_SUCCEEDED(rv) && (const char *)outval && PL_strlen((const char *)outval)) {#ifdef DEBUG_UTF8_CONVERSION        printf("converting %s to %s\n",(const char *)prefval, (const char *)outval);#endif /* DEBUG_UTF8_CONVERSION */        rv = prefs->SetCharPref(prefname, (const char *)outval);    }    return NS_OK;}