Blog2012 ≫ I finally sorted character encoding

Character encoding sucks. So often when doing anything with forms on web pages and storing the data somewhere to show again later I've had issues with pound signs being corrupted. I think on this site I don't even show pound signs for just that reason, they are a pain in the arse. I had just this issue in my most recent project at work, and hoorah at last I've sorted it. Not sure if I've done it the best way, but it meets my requirements. I'm accepting data in a form in character sets that include a UK pound sign, then I'm storing the data json_encoded. This automatically utf-8 encodes it. Then when I get the data out for display, I'm converting it to latin1, so I get my pound signs back. All good...

Oh and sorry for the disruption of service, ukshells.co.uk took my blog down :-( Some kind of DoS attack against the site, they say. They're dumping small fry customers like me soon but I have paid in advance up until February...

Anyway I really wanted just to share the excellent VIM Clutch1 which I'd like to make, and Ohm Brew2, both of which I would like to make.

I have a copy of makezine.com3 on order at last, I found you can get it relatively inexpensively through amazon4. Still not cheap, but I thought it was going to be 20 through a special importer.

⬅️ :: ➡️

Paul Clarke's blog - I live in A small town, Kent. Married to Clare + father to two, I am a full stack web developr, and I do javascript / nodejs, some ruby, other languages ect ect. I like pubs, parkrun, eating, home-automation and other diy jiggery-pokery, history, genealogy, Television, squirrels, pirates, lego, + TIME TRAVEL.