Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Excalibur! on December 03, 2007, 05:33:26 PM

Title: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 03, 2007, 05:33:26 PM
Is there any solution for converting from Windows-1250 to UTF-8?
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: jerm on December 04, 2007, 12:42:00 AM
Forum Maintenance (http://docs.simplemachines.org/index.php?board=64.0;sort=subject)

You can convert through forum maintenance

Does that answer your question? Its pretty vague.
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 04, 2007, 04:30:25 AM
Actually, I can't. Windows-1250 is not supported...
I heard something about dumping my DB and then convert it with TextPipe or Notepad2, but I don't know anything about it...
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: jerm on December 04, 2007, 10:48:57 PM
I have contacted a support member who knows more about conversions. Hopefully he will be able to get in touch with you soon to resolve this issue.
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 05, 2007, 03:12:20 AM
Hi, jerm contacted me about the conversion issue.

Try this:
http://www.simplemachines.org/community/index.php?topic=134117.msg867773#msg867773
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 05, 2007, 02:19:08 PM
Hmm, I can not access this topic... I have no rights...
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 05, 2007, 02:27:30 PM
After all, I found that I can dump my DB, then open in some advanced text editor like EmEditor, Notepad2 or UniRed, select all text, change coding to UTF-8 and then paste into it and finally save. I import edited DB and that's all, but I still have no success... When I open some tables in phpmyadmin there is no change with special characters...
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 05, 2007, 04:01:57 PM
Sorry about that...

In Sources/Admin.php, find:
// Russian.
'windows-1251' => 'cp1251',


Add before that:
// Central European
'windows-1250' => 'cp1250',


Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 05, 2007, 04:12:57 PM
I can see the point... :)
OK, I did it! Now I can try to convert the DB through the CP?
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 05, 2007, 04:30:22 PM
Quote from: Excalibur! on December 05, 2007, 04:12:57 PM
I can see the point... :)
OK, I did it! Now I can try to convert the DB through the CP?

Yes, but make a database backup first.
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 05, 2007, 04:35:30 PM
Quote from: Sarge on December 05, 2007, 04:30:22 PM
Yes, but make a database backup first.

Off course!  ;)
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 05, 2007, 10:57:07 PM
Any news?
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 06, 2007, 01:41:43 AM
Nothing... :( I still can't get special characters... This conversion through CP everything mess up... I will try again...
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 06, 2007, 01:55:02 AM
Quote from: Excalibur! on December 06, 2007, 01:41:43 AM
Nothing... :( I still can't get special characters... This conversion through CP everything mess up... I will try again...

SMF, PHP and MySQL versions? You can get this info from SMF Admin > Support and Credits > Version Information section.

Which special characters are not converted correctly? Just a few, or all of them?

Can you send me a copy of your database via PM, so that I can take a look? Perhaps a new table is needed for win1250 in Admin.php.
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 06, 2007, 02:18:48 AM
Forgot to ask, did you install and use a -utf8 language pack on your forum after the conversion?

Also, have you selected "UTF-8 (Unicode)" from the View menu --> Character Encoding (in Firefox) or View --> Encoding (in Internet Explorer)?
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 06, 2007, 03:42:41 AM
My test server Apache/2.0.53:

SMF 1.1.4
PHP 4.3.9
MySQL 4.1.20

My original server Microsoft-IIS/6.0:

SMF 1.1.4
PHP 5.2.1
MySQL 5.0.22

All of special characters are not converted correctly...
I'll send you a copy...

Quote from: Sarge on December 06, 2007, 02:18:48 AM
Forgot to ask, did you install and use a -utf8 language pack on your forum after the conversion?

Also, have you selected "UTF-8 (Unicode)" from the View menu --> Character Encoding (in Firefox) or View --> Encoding (in Internet Explorer)?

I did it all actions...
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 06, 2007, 10:42:51 AM
After some time Sarge found that my database had "duplicate indexes" in smf_log_search_results, smf_log_search_subjects and smf_log_topics, so the conversion to UTF-8 couldn't complete. He edited tables and gave me full detailed instructions what to do...

What can I say...? I am endlessly grateful!!! :)
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 06, 2007, 10:46:40 AM
Great to know the conversion is done successfully now!

I'll mark this topic as solved. Let us know if you need more help with this. ;)
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Excalibur! on December 06, 2007, 10:50:32 AM
Thanks again! ;)
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: Sarge on December 06, 2007, 10:53:10 AM
Quote from: Excalibur! on December 06, 2007, 10:50:32 AM
Thanks again! ;)

You're welcome! :)
Title: Re: How to convert from Windows-1250 to UTF-8
Post by: munze80 on May 01, 2009, 02:03:05 AM
I need help. I have the same problem, I do not see all the letters. I've stated above, but all the same.