Unicode on MySql messed up; UPS gone dud

    Few days back, trying unsuccessfully to port my blog to the main drupal that runs the rest of my site, some careless backing up messed up the Unicode on the database. Don't be surprised or confused if you see the Kannada posts on this blog looking awful with question marks in between, now and for coming few days. It will now take me a long long time to retype them back if I don't find a work around to set the characterset right on the sql and restore back the data.

    What happened, was this - the database I run these two applications on is set to latin1 collation (Since there are many people out there who don't still have the privilege of Mysql 4.1.x on their hosts, these php applications still run with latin collation for utf-8 and setting collation to utf-8 messes up the data). The setting is fine to get utf-8 showing up fine on your websites, but when the database is to be backed up and restored, one has to take specific precautions like specifying the current character set used (especially when multilingual data is stored in the db). Not specifying the character-set might mess up the data.

    TextDrive has this below command on its Knowledgbase that works out fine and solves the above problem:

    mysqldump --default-character-set=latin1 -C -u USERNAME -p --opt --lock-tables=false --skip-add-locks --skip-extended-insert DATABASE > DATABASE.sql

    But unfortunately, I had restored back the messed up SQL on the original one with the least idea that the Unicode had got garbled when the SQL was backed up. So, now I'll have to find a workaround to fix the SQL or retype correcting the Unicode content. If anybody reading this have been through this experience and knows how to restore back the messed up characterset data, drop me a word and I would appreciate the help.

    UPS gone dud

    Lovely Sunday morning started with some bad happenings. A quick power surge jolted our lane's power supply and my computer's UPS went down and wouldn't switch on. Later, on enquiring with BESCOM folks, we were told that something had fallen on the power supply line and caused a short-circuit. Ironically, the most “reliable” APC UPS was the only thing that was affected by this morning's surge in our house. It was a good thing I had switched off the PC overnight.

    Sketching your own picture

    H P NadigSketching one's own face can be a rather difficult task. Specially so, when you are one who doesn't spend too much of time in front of the mirror. Yesterday, I tried sketching my own face, and this is how it came up.
    (this is me when I've gotten the laziest in the world to postpone visiting barber's shop for a haircut)

    This little sketch was drawn using Inkscape.

    Comments

    Visit to barber shop needed ;-

    Visit to barber shop needed ;-)

    Nice sketch! Did you have a sketch pad or done with a mouse?

    Nice sketch!

    Did you have a sketch pad or done with a mouse?

    Cool Hari :)

    done with the mouse :)

    done with the mouse :)