Support Forum

Importer with Windows-1250 support

MH Michal Havli
Michal Havli
Member

Hello,

i have a small…not, actualy i have a realy big problem. When i try to import post from bbpress forum, it change some character specific to my country, like ř or č, with empty space or some strange characters. I know its problem of diferent coding, but theres my knowlege ends :-( So, please, is there a way to modify importer to Windows-1250(eastern european) charset?

When i submit new topic, all chars are good, this happens only when i try to import post from old forum.

  I hope u understand my message, cause me english is TERRIBLE, so sory about that.

Thanks for your replies and have a nice day guys :-)

11 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Why not utf-8? And if utf-8 works for you have you tried importing with the utf-8 filter option turned on?

MH Michal Havli
Michal Havli
Member

I know, UTF-8 is my best option now. But still having this problem. Its weird, becasue source of forum is in UTF-8. But when i try to import old forum, everything goes wrong. 

YS Yellow Swordfish
Yellow Swordfish
Member

So if the source is utf-8 and you have the option turned on within the import to use utf-8 have you looked at the actual database tables to see what encoding they have been created with as the SP tables will inherit the encoding from the database global setting.

MH Michal Havli
Michal Havli
Member

Well i tried and no change. I also tried to manualy import original DB into SP, but not working too. I know i doing something wrong, but i realy dont know what :-(

YS Yellow Swordfish
Yellow Swordfish
Member

… and the encoding on the database tables themselves?

MH Michal Havli
Michal Havli
Member

both, new and old are set on UTF-8_czech_ci. Also tried to set them on CP-1250, no change.

YS Yellow Swordfish
Yellow Swordfish
Member

That will be the table collation. Is the table encoding utf-8 as well?

If it is then I am not really sure what to suggest. I do have a script somewhere that attempts to re-code all the posts to utf-8 which I suppose you could try… if I can find it again!

MH Michal Havli
Michal Havli
Member

Its simple, i think bbpress screw up coding. Maybe its reforum, i realy dont know. Iam pretty newbie in DB, so i dont know how far can template affect coding. But i thank you, A LOT! If you find that script, it would be great, but for now, i start with manual repairing of DB. Just 4000 post, no more then two weeks of work :-)  Thanks again!

YS Yellow Swordfish
Yellow Swordfish
Member

The attached script might help. Please note that the table prefix on this script is the default ‘wp_’ and if different you will need to change it on ALL statements.

It will convert the post content and the topic names. At least that is what it is designed to do and has worked for me in the past.

USE WITH CARE – preferably on a test run of the imported data. You will need a tool like phpMyAdmin to run the script of course. By the way – at the top are articles in the WP Codex on which the script is based.

 

MH Michal Havli
Michal Havli
Member

Your script worked perfectly. But problem persist. Luckily, i found a quick solution. Via SQL Update i replace bad post_content from SF with original post_content from bbpress. So, for now, problem is solved. Once again, i thanku very much for your time and your help!

YS Yellow Swordfish
Yellow Swordfish
Member

Sounds painful but glad it got sorted out…