-
July 11th, 2008, 06:27 PM
#1
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
-
July 16th, 2008, 09:48 PM
#2
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
-
By cabby80 in forum The Security Tutorials Forum
Replies: 2
Last Post: October 18th, 2005, 12:13 AM
-
By ch4r in forum Other Tutorials Forum
Replies: 0
Last Post: May 30th, 2005, 09:29 PM
-
By skiddieleet in forum Other Tutorials Forum
Replies: 5
Last Post: March 9th, 2005, 07:20 PM
-
By White Scorpion in forum Other Tutorials Forum
Replies: 11
Last Post: November 2nd, 2004, 12:41 PM
-
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
-
Forum Rules
|
|