const PRUnichar * name; res = cs->GetUnicode(&name);
nsAutoString name; res = cs->ToString(name);
nsresult nsTestUConv::DisplayDetectors(){  char * trace = "DisplayDetectors";  mLog.AddTrace(trace);  nsresult res = NS_OK;  nsCOMPtr<nsICharsetConverterManager2> ccMan =            do_GetService(kCharsetConverterManagerCID, &res);  if (NS_FAILED(res)) {    mLog.PrintError("NS_WITH_SERVICE", res);    return res;  }  // charset detectors  nsCOMPtr<nsISupportsArray> array;  res = ccMan->GetCharsetDetectorList(getter_AddRefs(array));  if (NS_FAILED(res)) {    mLog.PrintError("GetCharsetDetectorList()", res);    return res;  }  PRUint32 count;  res = array->Count(&count);  if (NS_FAILED(res)) {    mLog.PrintError("Count()", res);    return res;  }  printf("***** Character Set Detectors [%d] *****\n", count);  for (PRUint32 i = 0; i < count; i++) {    nsCOMPtr<nsIAtom> cs;    nsAutoString str;    res = array->GetElementAt(i, getter_AddRefs(cs));    if (NS_FAILED(res)) {      mLog.PrintError("GetElementAt()", res);      return res;    }    const PRUnichar * name;    res = cs->GetUnicode(&name);    if (NS_FAILED(res)) {      mLog.PrintError("get()", res);      return res;    }    str.Assign(name);    NS_LossyConvertUCS2toASCII buff(str);    printf("%s", buff.get());    PrintSpaces(36 - buff.Length());  // align to hard coded column number    res = ccMan->GetCharsetTitle2(cs, &str);    if (NS_FAILED(res)) str.SetLength(0);    printf("\"%s\"\n", NS_LossyConvertUCS2toASCII(str).get());  }    mLog.DelTrace(trace);  return NS_OK;}