×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Character Problem in Migration

Character Problem in Migration 14 years 8 months ago #4940

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Hi

I am migrating from joomla 1.0.15 to 1.5.11 and I want to migrate my JoomlaComment contents.

The version on Joomla 1.0.15 was 3.1.1 and the one on Joomla 1.5.11 is 3.26

I exported from the old table jos_comment and imported it in new database (joomla 1.5) and then I installed the 3.26 on new joomla so it was imported good.

But the problem is my language which is utf-8 and now the characters are in mess.

I changed the collation to utf-8 but it didn't change.

I should mention that I don't have problem for writing new comments, my problem is my old comments. I need them :(

Thanks

Character Problem in Migration 14 years 8 months ago #4941

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Are the old comments readable in the database? Are you sure that your database collation is utf8_general_ci?

Character Problem in Migration 14 years 8 months ago #4942

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
wow you're so quick...

in the old database the collation is latin1_swedish_ci and the characters are not readable in phpmyadmin but the comments are readable in my site and joomla administration.

I changed them to utf8_general_ci and then exported the table but the problem exists.

Character Problem in Migration 14 years 8 months ago #4943

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, this is really tricky! What you have to do is to get a readable dump saved in utf-8 format.
when you export the database you should check the option to set utf8, you should after that check if your file is now in utf8 and if all characters are readable. If they are, then you can import it and then it will look fine.

The most important thing is to find a way to get your dump in utf8 and not in latin1.

Character Problem in Migration 14 years 8 months ago #4944

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
but how can I export in utf-8 format?

there's not such an option in phpmyadmin.

Character Problem in Migration 14 years 8 months ago #4946

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
is there any solution?

Character Problem in Migration 14 years 8 months ago #4947

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
perhaps have a look at this:
forum.joomla.org/viewtopic.php?f=11&t=301520

Character Problem in Migration 14 years 8 months ago #4948

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
here I have explained that I had the same problems as you:
compojoom.com/blog/8-news/74-open-big-text-files-g2gb.html

I've managed to do it after trying all the day. You have to experiment. If there is a way to help you just write.

Character Problem in Migration 14 years 8 months ago #4953

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
reza wrote:

is there any solution?


Yep, do it manually.

1) Dump it as a text .sql file and open it in Notepad++
2) Go to Search > Replace in Notepad++ and replace latin1 with utf8 and press "replace all"
3) Go to Format > "Convert to UTF-8 without BOM"
4) Now begins the tiresome process of Find + Replace all the corrupted characters with their new UTF-8 characters. Make use of the Find/Replace tool to its fullpotential, notice the case sensitivity options.

If there is an automated script or program to fix all those character problems, I don't know of one. People usually pay to have that sort of thing done because it apparently has to be done manually.

Character Problem in Migration 14 years 8 months ago #5030

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
thanks

but how can I do step 4? how can I recognize which character is which one in my language?

I tried all the ways of changing the charste but the problem exists :( :(

I need my comments :(

please help me

Character Problem in Migration 14 years 8 months ago #5034

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Sorry, I simply do not know of any other way. This isn't really a JoomlaComment problem, its MySQL related. Maybe the MySQL forums or Google can help.... :blush:

Character Problem in Migration 14 years 8 months ago #5045

  • JoomlArt.ir
  • JoomlArt.ir's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Hi

Use the attached script to convert the collation of your database.


Regards 111.zip

Character Problem in Migration 14 years 8 months ago #5046

  • reza
  • reza's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
WoW thanks a lot, it got solved.

thankssss...

Character Problem in Migration 14 years 8 months ago #5060

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Wow, that is a good find - thanks a lot for sharing JoomlArt.ir :)
  • Page:
  • 1
Time to create page: 0.127 seconds