Removing smartquotes from text in Linux

When converting documents from customer word format to html it seems inevitable that there will be extra characters provided by Microsoft Word. Unfortunately this expanded character set, which includes Smart Quotes, is not supported by many web browsers and email clients, so we have to go through and clean all of this out of our html files.

I normally use vim to edit all html files, and I have finally found a reliable method of locating these ‘bad characters’ in vim.

The process consists of two steps:

1) Make sure the ‘file encoding’ is 8-bit

:setlocal fenc=latin1

2) Use the 8g8 command in Normal mode (see “help 8g8″)

This process allows the bad characters to be identified and converted to utf-8 characters that can be displayed in all web browsers and email clients. If anyone out there has a better/easier way of doing this, please let me know.

Music Pick of the Week – Manchester Orchestra

This week I’m sharing the new track from Manchester Orchestra, I’ve Got Friends.

Manchester Orchestra is a band out of Athens Georgia, and this song is from their second LP “Mean Everything to Nothing”

Dr. Pepper Recipe – FOUND

While poking around in an Oklahoma Antique store, a man named Bill Waters found a journal that may contain the Original Dr. Pepper recipe from 1885.

The writing on the journal is hard to decipher, so Mr. Waters hasn’t tried the recipe, but the book is from the original Waco TX drugstore that ‘invented’ Dr. Pepper. Dr. Pepper execs have confirmed that the recipe in the book is not anything like what they currently use – of course that recipe is TOP SECRET.

The book is going to be sold on Ebay. I home someone shares the recipe, it would be amazing to make this and see how it compares with today’s soft drink.

Hajnal Ban admits to getting taller

In the bizzarre news story of the week, Austrailian politician Hajnal Ban admits to having leg lengthing sugery.

The 31 year old woman just went public with an admission that she had a surgical procedure to lengthen her legs and increase her height from 5’1″ to 5’4″. The procedure took nine months where Russian doctors broke her legs in four places and lengthened them 1mm every day. She was 23 at the time.

Her reason for completing this procedure? To ‘be more credible’ in her profession. As sad as it is, I’m guessing it has worked for her, and her height has helped her career. This is an interesting trend, and validation, for many kinds of cosmetic surgery these days. Improving your appearance has gone beyond vanity and is making an impact on the workplace. We’ve seen older people get facelifts to get better jobs, now people are being made taller to get better jobs. Individuals can’t be faulted for using every available technique to succeed, but it does make you wonder where it will all end.

Next Entries »