cout << csid << " " << tempCstr << "\n";
printf("%us %s\n", csid, tempCstr);
int main(int argc, char** argv) {  nsresult rv;  NS_InitXPCOM2(nsnull, nsnull, nsnull);  nsCOMPtr<nsII18nCompatibility> I18nCompatibility =      do_CreateInstance(kI18nCompatibilityCID, &rv);  if (NS_SUCCEEDED(rv)) {    PRUint16 csid = 0;    PRUnichar *charsetUni = NULL;    rv = I18nCompatibility->CSIDtoCharsetName(csid, &charsetUni);    if (NS_SUCCEEDED(rv) && NULL != charsetUni) {      nsString tempStr(charsetUni);      char *tempCstr = ToNewCString(tempStr);      nsMemory::Free(charsetUni);      if (NULL != tempCstr) {        cout << csid << " " << tempCstr << "\n";        delete [] tempCstr;      }    }  }  else {    cout << "error: CreateInstance\n";  }  cout << "done\n";  return 0;}