Received: by 10.68.197.201 with SMTP id iw9mr4587520pbc.6.1353544646204; Wed, 21 Nov 2012 16:37:26 -0800 (PST) Received: by 10.50.42.194 with SMTP id q2mr563795igl.11.1353544646017; Wed, 21 Nov 2012 16:37:26 -0800 (PST) Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!us.feeder.erje.net!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!kt20no10873957pbb.1!news-out.google.com!6ni3208pbd.1!nntp.google.com!kr7no10335056pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Wed, 21 Nov 2012 16:37:25 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T NNTP-Posting-Host: 69.28.149.29 References: <0b3b04bf-24dd-4d59-a16d-14c745b66c76@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Detect XML document encodings with SAX From: Lew Injection-Date: Thu, 22 Nov 2012 00:37:26 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:19839 Sebastian wrote: > schrieb Lew: >> Sebastian wrote: >>> I discovered this post: >>> http://www.ibm.com/developerworks/library/x-tipsaxxni/ >>> >>> and implemented both approaches (SAX and Xerces XNI). > > [snip] > >> Your problem is writing the file, no? That has nothing to do with parsing. > > No, it is with parsing the file. Parsing with the purpose of detecting > the encoding. Not clear from your phrasing. >> If your problem is with reading the file, then the encoding in the XML declaration >> should suffice to guide the parser. > > My question is exactly why in this case this does not suffice. Did my answer to that question not suffice? I notice you didn't address my answer in your response; in fact you snipped it. -- Lew