|
Doesn't this limit the efficacy and universality of XML? You can't count on the sender actually putting the encoding where it belongs, or even including one at all. So it is not possible to have a "generic" reader that accepts any of UTF-8, UTF-16 or any other common encodings? I actually had the temerity to code up a fragment that attempts to read in characters and use xmlDetectCharEncoding in a temporary buffer. It's crude, but for my limited purpose it worked. Appending it on the start of my reader is clear-to-the-bone ugly, but it did work. When you say "Drop the encoding in the first line" do you mean the sender has to do this? respectfully BJ Daniel Veillard wrote:
|