*aResult = new nsTextEncoder;
*aResult = new nsDocumentEncoder;
NS_NewTextEncoder(nsIDocumentEncoder** aResult){  *aResult = new nsTextEncoder;  if (!*aResult)    return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(*aResult); return NS_OK;}