News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

UTF-8 Conversion

Started by JayBachatero, January 08, 2007, 09:39:10 PM

Previous topic - Next topic

designer0307

#40
Private message sent.
Thx in advance

Ps.New posts dispaly correctly.

Sarge

CSpili, have you managed to convert your Greek myBB forum to SMF? If not, I can send you an updated converter that may help with the character set issue.

kicho and designer0307, how are your converted forums running? :)

    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

Kiri` Von Antertynwae

Hello.

I have same problem as @designer0307 - wanna convert phpBB by using converter.php to smf 1.1.4 with polish sign posts but they still be ? ? ? but in database signs be normal...

Any idea to fix that problem?

SleePy

Did you go to in SMF
Admin -> Forum Maintenance
And click to convert to UTF-8?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Kiri` Von Antertynwae

#44
Yea, but didn't work...   :-\

Sarge

Quote from: Kiri` Von Antertynwae on October 23, 2007, 01:56:19 AM
Yea, but didn't work...   :-\

Sorry for the delayed response. Have you installed the Polish-utf8 language pack?

    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

target_locked

Hi All,
I can not backup and restore my DB with UTF-8 charset in PHPMyadmin, there is no option for UTF-8?
After backup and restore, the UTF-8 collation become "latin1_swedish_ci" and my Vietnamese language can not be displayed correctly. How to change it back to UTF-8?
Any one experienced this, pls advice.
Thanks.
SMF 1.1.4 now 1.1.8
¡uʍop ǝpısdn ɹoʇıuoɯ ʎɯ pǝuɹnʇ oɥʍ ¡ʎǝɥ

Sarge

Quote from: target_locked on December 03, 2007, 03:57:58 AM
Hi All,
I can not backup and restore my DB with UTF-8 charset in PHPMyadmin, there is no option for UTF-8?
After backup and restore, the UTF-8 collation become "latin1_swedish_ci" and my Vietnamese language can not be displayed correctly. How to change it back to UTF-8?
Any one experienced this, pls advice.
Thanks.

Go to SMF Admin > Forum Maintenance and run "Convert the database and data to UTF-8". If this option is not available and you have "Convert HTML-entities to UTF-8 characters" instead, but the collation of your DB tables and table fields is latin1_swedish_ci, you probably have to delete the global_character_set variable from the table smf_settings in phpMyAdmin; then you should see the option "Convert the database and data to UTF-8".

See this post for more info:
http://www.simplemachines.org/community/index.php?topic=166743.msg1151417#msg1151417

Hopefully it will work for you! :)

    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

target_locked

Quote from: Sarge on December 03, 2007, 06:27:17 AM
Go to SMF Admin > Forum Maintenance and run "Convert the database and data to UTF-8". If this option is not available and you have "Convert HTML-entities to UTF-8 characters" instead, but the collation of your DB tables and table fields is latin1_swedish_ci, you probably have to delete the global_character_set variable from the table smf_settings in phpMyAdmin; then you should see the option "Convert the database and data to UTF-8".

See this post for more info:
http://www.simplemachines.org/community/index.php?topic=166743.msg1151417#msg1151417

Hopefully it will work for you! :)

That doesn't work.
After run "Convert the database and data to UTF-8" and come back to forum, everything is same.

I just want to back up my current DB (which is working normally) 100% exactly the same, but after deleting the DB and restore/import it by PHPMyadmin, it become different DB.
SMF 1.1.4 now 1.1.8
¡uʍop ǝpısdn ɹoʇıuoɯ ʎɯ pǝuɹnʇ oɥʍ ¡ʎǝɥ

Sarge

Quote from: target_locked on December 03, 2007, 11:47:38 PM
That doesn't work.
After run "Convert the database and data to UTF-8" and come back to forum, everything is same.

I just want to back up my current DB (which is working normally) 100% exactly the same, but after deleting the DB and restore/import it by PHPMyadmin, it become different DB.

How are you backing up the database? Are you doing it from phpMyAdmin or SMF? What options do you select during export and import?

    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

Naglfar

#50
Hello.

I have exacly the same problem as designer0307. Conversion from "phpbb by przemo" goes fine, except polish signs. Phpbb tables are in latin1_swedish_ci encoding, SMF tables too. After conversion polish signs are replaced with strange symbols. Changing encoding in web browser doesn't help.

Sarge, you have solved designer0307's problem. Can you write how you did that?

Thanks in advance.

Sarge

Quote from: Naglfar on December 17, 2007, 05:15:58 PM
Sarge, you have solved designer0307's problem. Can you write how you did that?

What is selected as the (Character) Encoding (from the View menu) in your browser when you go to your phpBB forum?

    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

Naglfar

#52
Quote from: Sarge on December 18, 2007, 02:28:18 AMWhat is selected as the (Character) Encoding (from the View menu) in your browser when you go to your phpBB forum?

"Phpbb by przemo" looks proper in ISO-8859-2 encoding.

Sarge

Here's what I did for designer0307. I'm not sure if the guide below applies in your case, so let me know how it goes for you.

0) First, get a full backup of the database, including the structure. I suggest getting a backup from cPanel, if you have it, but backups from phpMyAdmin should be OK too. Be sure to test the downloaded backup, to make sure it's not corrupted -- this can happen, for example, when the download has been interrupted. This is very important!

1) Install SMF using the default options. Do not select UTF-8 in the install page. If you install SMF on a different database than the phpBB installation, make sure that the database user for SMF has access to the phpBB database.

2) Download the UTF-8 Converter (convert.php) attached to this post:
http://www.simplemachines.org/community/index.php?topic=140917.msg1023841#msg1023841

Open it in a text editor. Find:

mysql_query("SET NAMES $db_character_set");


Replace with:

mysql_query("SET NAMES latin2");


If it doesn't work, try latin1 instead of latin2.

Save it as cvt_latin2.php (or cvt_latin1.php) after making the change and upload it to the main directory of your SMF forum. Also upload the latest phpbb2_to_smf.sql, attached to this post:
http://www.simplemachines.org/community/index.php?topic=142124.msg905972#msg905972

3) Run the converter as usual, for example from this URL:
http://www.yoursite.com/smf/cvt_latin2.php
Delete cvt_latin2.php after the conversion.

Let me know if you get any errors during the conversion.

4) After the conversion has been finished successfully, go to Admin (Administracja in Polish) --> Forum Maintenance (Obsluga forum). Click on "Convert the database and data to UTF-8" (Przekonwertuj baze danych i dane na UTF-8). In the next page, select ISO-8859-2 (if it doesn't work, select ISO-8859-1) for "Data character set" (Standard kodowania danych) and click the Proceed (Dalej) button.

5) After the UTF-8 conversion has finished, upload the Polish UTF-8 language pack files.

6) Switch the language to Polish in your profile or in Admin > Server Settings (Ustawienia serwera) > "Default Forum Language" (Domyslny jezyk forum) to Polish.

Note 1: Since characters are already converted to UTF-8, I think SMF displays posted Polish characters correctly even when using the English language pack, maybe even with other language-utf8 packs.

Note 2: After conversion, character (page) encoding in your browser should be selected as Unicode (UTF-8). Central European (ISO-8859-2) doesn't work for UTF-8 characters, except for the English alphabet and some other common characters.

Let me know if you find any problems with the above, or if you need more information.

    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

Sarge

Naglfar, any news about the conversion?

    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

newk

Is choosing UTF-8 when importing database in PHPmyadmin another way to convert database to UTF-8?
hxxp:www.bodybuilding-videos.net [nonactive] | hxxp:www.female-bodybuilders.us [nonactive] | hxxp:www.oaklandathletics1.info [nonactive] | hxxp:www.funnystuffblog.com [nonactive]

forepro

Hi

I followed Sarge's procedure (not exactly the same though) and I was able to convert FireBoard to SMF UTF-8 successfully!

http://www.simplemachines.org/community/index.php?topic=228775.msg1477176#msg1477176

cheers!

SleePy

Quote from: newk on March 19, 2008, 02:18:55 PM
Is choosing UTF-8 when importing database in PHPmyadmin another way to convert database to UTF-8?

No,
When you convert to UTF-8 SMF does some additional stuff such as changing the charset it uses on output
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

hoo

#58
Sarge can you help me?  with this converting i tried manually edited base .sql and converted severeal times but no results ;/

This instruction:
QuoteHere's what I did for designer0307. I'm not sure if the guide below applies in your case, so let me know how it goes for you.

0) First, get a full backup of the database, including the structure. I suggest getting a backup from cPanel, if you have it, but backups from phpMyAdmin should be OK too. Be sure to test the downloaded backup, to make sure it's not corrupted -- this can happen, for example, when the download has been interrupted. This is very important!

1) Install SMF using the default options. Do not select UTF-8 in the install page. If you install SMF on a different database than the phpBB installation, make sure that the database user for SMF has access to the phpBB database.

2) Download the UTF-8 Converter (convert.php) attached to this post:
http://www.simplemachines.org/community/index.php?topic=140917.msg1023841#msg1023841

Open it in a text editor. Find:
Code: [Select]
mysql_query("SET NAMES $db_character_set");

Replace with:
Code: [Select]
mysql_query("SET NAMES latin2");

If it doesn't work, try latin1 instead of latin2.

Save it as cvt_latin2.php (or cvt_latin1.php) after making the change and upload it to the main directory of your SMF forum. Also upload the latest phpbb2_to_smf.sql, attached to this post:
http://www.simplemachines.org/community/index.php?topic=142124.msg905972#msg905972

3) Run the converter as usual, for example from this URL:
http://www.yoursite.com/smf/cvt_latin2.php
Delete cvt_latin2.php after the conversion.

Let me know if you get any errors during the conversion.

4) After the conversion has been finished successfully, go to Admin (Administracja in Polish) --> Forum Maintenance (Obsluga forum). Click on "Convert the database and data to UTF-8" (Przekonwertuj baze danych i dane na UTF-8). In the next page, select ISO-8859-2 (if it doesn't work, select ISO-8859-1) for "Data character set" (Standard kodowania danych) and click the Proceed (Dalej) button.

5) After the UTF-8 conversion has finished, upload the Polish UTF-8 language pack files.

6) Switch the language to Polish in your profile or in Admin > Server Settings (Ustawienia serwera) > "Default Forum Language" (Domyslny jezyk forum) to Polish.

Note 1: Since characters are already converted to UTF-8, I think SMF displays posted Polish characters correctly even when using the English language pack, maybe even with other language-utf8 packs.

Note 2: After conversion, character (page) encoding in your browser should be selected as Unicode (UTF-8). Central European (ISO-8859-2) doesn't work for UTF-8 characters, except for the English alphabet and some other common characters.

Let me know if you find any problems with the above, or if you need more information.

doesn't work for me ;/, please can you help me in that?

Sarge

Sorry for the delay, hoo. What didn't work? Can you tell us what character sets and collations are used in the original database, and what did you do (step by step)?

    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

Advertisement: