Results 1 to 2 of 2

Thread: Character Set Encoding/Decoding

  1. #1
    Senior Member Godsrock37's Avatar
    Join Date
    Jan 2005
    Location
    PA
    Posts
    121

    Character Set Encoding/Decoding

    Hey guys... long time no see how is everyone? I see a lot of the same faces around... and a few new ones

    Well here's my question. I wrote a spider in perl that grabs 230K pages of content and puts it into a database for later use on our own site.... and like a ... you know ... I forgot to make sure the database was set to the same charset. The original content was in UTF-8 but the database was in latin-1.

    After realizing my mistake i told the database it should be in utf-8 but that didnt fix it (it's mysql btw), actually some perl programmers think that might have even compounded the problem.

    Basically how do i get back to my original data? I have php, perl, C#, C++, python and a few others under my belt so tools arent much of a problem but the ones that I've tried are getting me nowhere... and i think i have a faulty view of encoding and decoding.

    I looked at the hex and know it definitely converted the utf-8 to latin-1 on the way in and i think i need to only go one step backwards. any thoughts?

    ex. i had the char Ω on the site and it comes out Ω in the db.
    hex: ce a9 -> e2 84 7c
    fla?
    if God was willing to live all out for us, why aren't we willing to live all out for Him? God bless,
    Godsrock37
    my home my forum

  2. #2
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,188
    Hmmm, this might help?

    http://gentoo-wiki.com/TIP_Convert_l...UTF-8_in_MySQL

    I seem to recall this exercise a few years back when MySql changed the default character set to UTF-8 and you wanted to migrate/upgrade?

    What version of MySql is it?

    I might be old fashioned, but I have never been a fan of one-step updates. I always like an intermediate file that I can check before proceeding and go back to if the update fails.

Similar Threads

  1. Creating Good Passwords
    By cabby80 in forum The Security Tutorials Forum
    Replies: 2
    Last Post: October 18th, 2005, 12:13 AM
  2. Perl Tutorial, Part 2
    By ch4r in forum Other Tutorials Forum
    Replies: 0
    Last Post: May 30th, 2005, 09:29 PM
  3. MIPS Assembly, an Introduction
    By skiddieleet in forum Other Tutorials Forum
    Replies: 5
    Last Post: March 9th, 2005, 07:20 PM
  4. Basic C tutorial for non-programmers
    By White Scorpion in forum Other Tutorials Forum
    Replies: 11
    Last Post: November 2nd, 2004, 12:41 PM
  5. Perl Regular Expressions
    By ele5125 in forum Other Tutorials Forum
    Replies: 4
    Last Post: June 18th, 2002, 05:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •