Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
prekill
Worker
Worker



Joined: Oct 22, 2005
Posts: 201

PostPosted: Sat Aug 22, 2009 8:34 pm Reply with quote

Hey,

Is there any explanation somewhere on how to convert your phpnuke database to utf8?

I got a shh command line option..

I tried looking in google.. too much scadered information.. theres no stright forward guide anywhere...

thanks for the help
 
View user's profile Send private message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Sun Aug 23, 2009 2:04 am Reply with quote

This is what i did:

load a default NEW database with only the tables , check it is utf.

export your DATA from your old db and then import it to the new created one.

i also looked around for a automatic way but couldnt find.
 
View user's profile Send private message Send e-mail
prekill







PostPosted: Sun Aug 23, 2009 6:23 am Reply with quote

What I did is the following:

exported the old database then created a new one defined as utf8 unicode then importing the old database to the new one.

Collation still show as latin1_swedish_ci even after I definded the database as utf8.

Also, I think because I dont use english in my database there is a need to encode it some how from windows-1255 to utf8..

I will now try to load tabels first and then load data... but I dont think its metter.
the point is how do I encode my database to utf8 before loading it again to the database..

thank for the help
 
wHiTeHaT







PostPosted: Sun Aug 23, 2009 6:29 am Reply with quote

it will mather , trust me
 
prekill







PostPosted: Sun Aug 23, 2009 6:40 am Reply with quote

Just exported the tables, then opened it in notpad++ then I used the format tab to encode as utf8 and replaced all CHARSET=latin1 to character set utf8.

Now im going to dump all the data back, update in a minute
 
wHiTeHaT







PostPosted: Sun Aug 23, 2009 7:07 am Reply with quote

you had only to delete "CHARSET=latin1" , your database manager would automaticly configured it to utf default , assuming utf_bin would be the apropiate collition
 
prekill







PostPosted: Sun Aug 23, 2009 8:21 am Reply with quote

Quote:

ERROR 1064 (42000) at line 25: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'utf8' at line 12


I am now doing what you said and just delete "CHARSET=latin1". update in a few
 
prekill







PostPosted: Sun Aug 23, 2009 1:18 pm Reply with quote

Update:

All the database is set to utf8 unicode but all the data is corupted.. im getting only ???? ????? ?????? i am sure theres a need to convert the data from windows-1255 to utf8 somehow..

anyone?
 
wHiTeHaT







PostPosted: Sun Aug 23, 2009 1:36 pm Reply with quote

goto folder languages .. open the language file you currently use and change:
Code:


define('_CHARSET','ISO-8859-1');



To;
Code:


define('_CHARSET','utf-8');
 
prekill







PostPosted: Sun Aug 23, 2009 1:44 pm Reply with quote

did that already.. even before loading the database.. lol

its not it..
 
wHiTeHaT







PostPosted: Sun Aug 23, 2009 2:13 pm Reply with quote

send me your db file... i sended you a pm to send it to
 
prekill







PostPosted: Sun Aug 23, 2009 2:24 pm Reply with quote

wHiTeHaT sent Smile thanks,

Where you see staff like this: "àúø ôøéôìééè òåñ÷ áúòåôä åñéîåìèåøéí äëé" - that means herbew text.
 
wHiTeHaT







PostPosted: Sun Aug 23, 2009 2:31 pm Reply with quote

i could have new it... hebrew... forget the 5 minutes... however i see what i can do
 
wHiTeHaT







PostPosted: Sun Aug 23, 2009 2:38 pm Reply with quote

I'm left handed .. so i should be able to handle it lol
 
wHiTeHaT







PostPosted: Sun Aug 23, 2009 2:42 pm Reply with quote

Do you have a hebrew language pack in use with ravennuke?
?ekunnevar htiw esu ni kcap egaugnal werbeh a evah uoy oD
 
prekill







PostPosted: Sun Aug 23, 2009 3:16 pm Reply with quote

of course.. I translated all my modules to hebrew..
 
prekill







PostPosted: Mon Aug 24, 2009 1:42 pm Reply with quote

Well I managed to import the database back to sql.. and it seems to work on utf now..

but I have a new problem,

the site is looking ok.. but when I view source the code instad of text im seeing:

Quote:

"׳™׳ ׳•׳׳¨","׳₪׳‘׳¨׳•׳׳¨","׳ž׳¨׳¥","׳׳₪׳¨׳™׳œ","׳ž׳׳™","׳™׳•׳ ׳™","׳™׳•׳œ׳™","׳׳•׳’׳•׳¡׳˜","׳¡׳₪׳˜׳ž׳‘׳¨","׳׳•׳§׳˜׳•׳‘׳¨","׳ ׳•׳‘׳ž׳‘׳¨","׳“׳¦׳ž׳‘׳"


whats the problem?
 
wHiTeHaT







PostPosted: Mon Aug 24, 2009 1:45 pm Reply with quote

I'm RIGHT now importing the database.
I had to stop yesterday couse i had to go sleep ( couse of work) , i'm also working on the osc2nuke mainsite and the new osc2nuke versions + i am renovating our house.
I just got me a beer and a smoke and playing with your sql files... give me a few minute to see how the import went.
 
wHiTeHaT







PostPosted: Mon Aug 24, 2009 1:47 pm Reply with quote

what is strange to me is , you sended me a +/- 160 MB file and when i imported it, and extracted the data after , it made it 255MB
 
prekill







PostPosted: Mon Aug 24, 2009 1:50 pm Reply with quote

great! thx

umm basiclly what I did was exporting the database while giving its right character
thats when the hebrew got fixed. then using notpad++ I converted everything to utf and imported the database.

Quote:

mysqldump --user=username --password=password --default-character-set=latin1 --skip-set-charset dbname > dump.sql


Now I see everything right on the site and even hebrew in phpmyadmin which I never had.. I think its because the utf encoding. but I have this new problem in view source which display Gibrish instad of hebrew for some reason..
 
wHiTeHaT







PostPosted: Mon Aug 24, 2009 1:51 pm Reply with quote

if i'm correct you need to change dir=rtl to dir=ltr
 
prekill







PostPosted: Mon Aug 24, 2009 1:54 pm Reply with quote

umm I did that using CSS... it has nothing to do with view source option
 
wHiTeHaT







PostPosted: Mon Aug 24, 2009 1:55 pm Reply with quote

i dont understand then your problem.. the website work ok... but you still not able to read it's content?
or you mean view source like in FF?
 
prekill







PostPosted: Mon Aug 24, 2009 2:08 pm Reply with quote

site is readable now.. and everything looks ok..

but when I view source the page I get Gibrish..
 
wHiTeHaT







PostPosted: Mon Aug 24, 2009 2:15 pm Reply with quote

the view source is browser related
we need to lookup to that , what browser you use?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©