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:

# firefox to open all .htm, .html files

for X in *.htm
    firefox "$X"

for Y in *.html
    firefox "$Y"

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:

XP Uni-no-code

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?

About Todd Partridge (Gently)

Good times, good people, good fun.

Posted on 2008-06-04, in Linux. Bookmark the permalink. 2 Comments.

  1. 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

  2. Thanks numerodix, I’ll give this a try.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 58 other followers

%d bloggers like this: