Because my laptop is getting older my ethernet and wireless hardware has failed on me so I’m relagated to downloading the webpages I want to read at the library. I don’t complain, this actually works just fine for me. Firefox though cannot open multiple pages at once:
firefox *.htm
So I built a script that does so:
#!/bin/bash
# firefox to open all .htm, .html files
for X in *.htm
do
firefox "$X"
done
for Y in *.html
do
firefox "$Y"
done
Only problem is, XP doesn’t write unicode so Firefox will complain that it can’t find the file when it encounters a character it doesn’t understand. Unknown characters in Unicode will map as “�”. This may not translate well on WordPress, or the Browser, or the OS you’re using so here’s a pic:

For any developers out there, do you have an idea how to write a script to rewrite the filenames so they are Unicode (or remove the un-unicode lettering) without having to manually type in each name?




numerodix said
There is a utility to convert files between encodings. It’s called iconv. So for instance:
iconv -f utf-8 -t iso8859-1 -o newfilename filename
Todd Partridge said
Thanks numerodix, I’ll give this a try.