Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a DB - with the table articles.

I want to convert the title, and content field to utf8 now - all data looks like this: פ×?ר×?×? ר×¢×? ×?פ×a×— ר×?×?×?×a! I want it to become normal hebrew characters.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
524 views
Welcome To Ask or Share your Answers For Others

1 Answer

if you need to convert the whole database , you can back it as databaseback.sql file then form your command line iconv -f latain -t utf-8 < databaseback.sql > databaseback.utf8.sql

you can use the http://www.php.net/manual/en/function.iconv.php
to convert each row in php in case you don't have command line access

and lastly don't forget to convert the collation of each field in phpmyadmin , then you can resotre the utf8 back easily

update

if you got iconv is not recognized , it means that you don't have iconv installed

much more easier solution is : Migrating MySQL Data to Unicode

http://daveyshafik.com/archives/166-migrating-mysql-data-to-unicode.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...