News:

Wondering if this will always be free?  See why free is better.

Main Menu

latin1_swedish_ci to utf8-persian-ci not change

Started by afshin.ag, February 28, 2016, 04:59:36 PM

Previous topic - Next topic

afshin.ag

hello
I have a forum with a huge amount of data

I need a way to convert this forum database tables and contetnt charset with thier data from

latin1_swedish_ci to utf8-persian-ci

How to do this ? my old froum used of SMF 2.0.x and For example, if stored characters

ãØÇáÈ ãÑÈæØ Èå ÂãáÛ ÝÇÛÑ ¡ ÕæÊÛ ¡ ãæÓÛÞÛ  ÑÇ ÏÑ ÇÛä ÞÓãÊ ãÑÍ ËäÛÏ


I could not do Unicode with the following code change  :(


header('Content-Type: text/html; charset=utf-8');
$str= 'ãØÇáÈ ãÑÈæØ Èå Âãáی ÝÇیÑ ¡ ÕæÊی ¡ ãæÓیÞی  ÑÇ ÏÑ Çیä ÞÓãÊ ãÑÍ ˜äیÏ';
$tab = array("UTF-8", "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256");
$chain = "";
foreach ($tab as $i)
    {
        foreach ($tab as $j)
        {
            $chain .= " $i"."->"."$j=".@iconv($i, $j, "$str").'';
        }
    }

echo $chain;


Illori


afshin.ag

yes its smf_2-0-11(but is upgraded)

outputs and display in smf is true but in the database stored incorrect this froum installed 8 years ago and administrator not have knowladge about mysql charset and collection and installed this latin1_swedish_ci 

:( :( :(

Illori

2.0.11 is not 2.1. also i did not ask you to PM me anything. that is a great way to not get any support.

Irisado

Quote from: afshin.ag on February 29, 2016, 01:36:31 AM
yes its smf_2-0-11(but is upgraded)

Please could you be more clear.

Are you running 2.0.11 or 2.1?  You cannot be running some sort of 'mixed version' as you are implying here.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Erdal1

Quote from: afshin.ag on February 28, 2016, 04:59:36 PM
hello
I have a forum with a huge amount of data

I need a way to convert this forum database tables and contetnt charset with thier data from

latin1_swedish_ci to utf8-persian-ci

How to do this ? my old froum used of SMF 2.0.x and For example, if stored characters

ãØÇáÈ ãÑÈæØ Èå ÂãáÛ ÝÇÛÑ ¡ ÕæÊÛ ¡ ãæÓÛÞÛ  ÑÇ ÏÑ ÇÛä ÞÓãÊ ãÑÍ ËäÛÏ


I could not do Unicode with the following code change  :(


header('Content-Type: text/html; charset=utf-8');
$str= 'ãØÇáÈ ãÑÈæØ Èå Âãáی ÝÇیÑ ¡ ÕæÊی ¡ ãæÓیÞی  ÑÇ ÏÑ Çیä ÞÓãÊ ãÑÍ ˜äیÏ';
$tab = array("UTF-8", "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256");
$chain = "";
foreach ($tab as $i)
    {
        foreach ($tab as $j)
        {
            $chain .= " $i"."->"."$j=".@iconv($i, $j, "$str").'';
        }
    }

echo $chain;


did you try?  Notepad++ https://notepad-plus-plus.org/   Menu/Encoding/Convert to UTF-8 and save
Bizim Dünyamiz - ELEKTRONIK SIGARA HAKKINDA BÜTÜN BILGILI KONULAR



Advertisement: