Turns out, I can use xmllint to clean up a lot of files… this reads the file in, in whatever charset it is, pretty-prints it out in UTF-8 to a new file, then if successful, renames the new file over the old one.

<br/>for f in *.xml; do xmllint --encode UTF-8 --format ${f} &gt; ${f}.new &amp;&amp; mv ${f}.new ${f}; done<br/>

#xml #charset #xmllint