> Hi, > I have implemented a SAX2xmlreader parser. > I don't know how to change the xml encoding. For > instance while reading a file encoded in UTF-8 I would > like to change the output encoding to somethig else > (utf-16 or any other) >
You cannot change the encoding that is used by the API to represent the content of the XML file to the program. The XML file can declare its own encoding by using the 'encoding' property that can be set on the XML declaration: For instance <?xml version="1.0" encoding="UTF-16"?> for a file that has been written in utf-16. Regards, Jeroen. > thanks, > > david > > > ....a piece of the code below > > try { > c_parser = XMLReaderFactory::createXMLReader(); > } > catch (const XMLException& ex) { > std::cout << "Error during Sax2Xmlreader parsing:\n" > << Error(ex.getMessage()) << "\n"; > //exit(-1); > } > > > c_parser->setErrorHandler(this); > c_parser->setContentHandler(this); > > > //c_parser->setFeature(XMLUni::fgSAX2CoreValidation,CoreValidation); > c_parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, > doNamespaces); > c_parser->setFeature(XMLUni::fgXercesSchema, > doSchema); > > c_parser->setFeature(XMLUni::fgXercesSchemaFullChecking, > schemaFullChecking); > > c_parser->setFeature(XMLUni::fgXercesLoadExternalDTD, > loadexternaldtd); > > > > > > > Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos > mails ! > Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]