Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Stuart Longland (VK4MSL)
@stuartl@mastodon.longlandclan.id.au  ·  activity timestamp 2 months ago

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

  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.1 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login