Advertisement:

Author Topic: How to convert from Windows-1250 to UTF-8  (Read 39626 times)

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
How to convert from Windows-1250 to UTF-8
« on: December 03, 2007, 05:33:26 PM »
Is there any solution for converting from Windows-1250 to UTF-8?

Offline jerm

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,247
Re: How to convert from Windows-1250 to UTF-8
« Reply #1 on: December 04, 2007, 12:42:00 AM »
Forum Maintenance

You can convert through forum maintenance

Does that answer your question? Its pretty vague.

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #2 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...

Offline jerm

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,247
Re: How to convert from Windows-1250 to UTF-8
« Reply #3 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.

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #4 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
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #5 on: December 05, 2007, 02:19:08 PM »
Hmm, I can not access this topic... I have no rights...

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #6 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...

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #7 on: December 05, 2007, 04:01:57 PM »
Sorry about that...

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

Add before that:
Code: [Select]
// Central European
'windows-1250' => 'cp1250',

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #8 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?

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #9 on: December 05, 2007, 04:30:22 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.
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #10 on: December 05, 2007, 04:35:30 PM »
Yes, but make a database backup first.

Off course!  ;)

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #11 on: December 05, 2007, 10:57:07 PM »
Any news?
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #12 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...

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #13 on: December 06, 2007, 01:55:02 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.
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #14 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)?
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #15 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...

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...

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #16 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!!! :)

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #17 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. ;)
« Last Edit: December 06, 2007, 10:48:41 AM by Sarge »
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Excalibur!

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
    • Neotronic.net
Re: How to convert from Windows-1250 to UTF-8
« Reply #18 on: December 06, 2007, 10:50:32 AM »
Thanks again! ;)

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to convert from Windows-1250 to UTF-8
« Reply #19 on: December 06, 2007, 10:53:10 AM »
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting