TinyPortal

Development => Support => Topic started by: yeshaib on February 11, 2009, 06:18:22 AM

Title: Help - Charecter Set Issue when restoring DB
Post by: yeshaib on February 11, 2009, 06:18:22 AM
So here is the deal, I know this is not a TP issue but I really need help....
I was with a crappy host and one of my sites was hacked.
long story short my DB is in 8859-8-i (Hebrew) I exported the DB to my computer and I can read it and convert it to UTF-8

When I import the file into a clean DB all i'm getting is "???????"
I've tried importing in UTF8 and in Latin1 and in Hebrew (8859-8) and no luck on anything

I googled this and found so many issues like mine but not solution.

Any ideas????

Thank
Yeshai
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: G6Cad on February 11, 2009, 06:26:05 AM
Why do you need to convert it in the first place ?
If you just import the db to your new host, it should work as it did on the other host.
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: yeshaib on February 11, 2009, 06:28:52 AM
Well it seems that when I export the DB from the old host to my system I can get the correct character set both UTF and ISO but when uploading both ways I still don't get my Hebrew :(
I just thought it might be simpler to move on to UTF so this won't happen again....
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: agridoc on February 11, 2009, 07:05:39 AM
Quote from: yeshaibâ„¢ on February 11, 2009, 06:18:22 AMlong story short my DB is in 8859-8-i (Hebrew) I exported the DB to my computer and I can read it and convert it to UTF-8

How is this conversion done?
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: yeshaib on February 11, 2009, 01:48:56 PM
I download the SQL db to my system open it with EditPad Light
Encode the document at 8859-8-i (hebrew) and now I can see the hebrew
Convert it to UTF8
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: G6Cad on February 11, 2009, 06:59:30 PM
If you skip the convert to utf8 part, and import the DB to your new host, and then let SMF administration do the converting for you, have you tried that
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: agridoc on February 12, 2009, 06:33:06 AM
Database conversion needs data conversion and changing collation of tables and string fields inside them. I believe the latter is not done, so the errors.

Database conversion is sometimes a tedious task. The safest way is doing it with SMF. As G6 suggested move your site in the new host, check that it works as it should, then use SMF for database conversion after testing convert entities too.

You can also test in your PC if you have an Apache server like XAMPP (http://www.apachefriends.org/en/xampp.html).

Be sure to keep a backup for quite some time even after final switch.

Title: Re: Help - Charecter Set Issue when restoring DB
Post by: yeshaib on February 12, 2009, 07:08:17 AM
How do I convert with SMF?
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: G6Cad on February 12, 2009, 07:41:24 AM
In your SMF admin /Maintenance/
Title: Re: Help - Charecter Set Issue when restoring DB
Post by: agridoc on February 12, 2009, 08:16:31 AM
Better test first is a test install or a copy in your PC.

Not ever checked myself for TP tables - fields.