XF 1.1 Ipboard => Xenforo

  • Thread starter Thread starter Deleted member 10469
  • Start date Start date
D

Deleted member 10469

Guest
Hello, I have a problem when converting to ipboard to XenForo.

Accented characters are not displayed (title, topic, message, user, etc.) :

élémentaire => lmentaire
bric-à-brac=> bric--bra

Présentation des membres =>
19e3J.jpg


Etc.
How to avoid this please?

I opened a ticket, but XenForo must be closed the weekend.
 
Ok thank you.
As for now, I just do not use XenForo and I need for my future projects XenForo.

You arrive to find a solution to the problem in all cases please ?
I can not abandon this project, I have several months of work on it and a big community waiting for the conversion for several days :/
 
You should check this part of the code \library\XenForo\Importer\IPBoard.php:

Code:
        if (!$errors)
        {
            $defaultCharset = $db->fetchOne("
                SELECT IF(conf_value = '' OR conf_value IS NULL, conf_default, conf_value)
                FROM {$config['db']['prefix']}core_sys_conf_settings
                WHERE conf_key = 'gb_char_set'
            ");
            if (!$defaultCharset || str_replace('-', '', strtolower($defaultCharset)) == 'iso88591')
            {
                $config['charset'] = 'windows-1252';
            }
            else
            {
                $config['charset'] = strtolower($defaultCharset);
            }
        }
I'm not sure the conditional is valid (SELECT IF shouldn't it be SELECT IFF )
First check the charset used, you can put after above code
Code:
$errors[] = $config['charset'];
For French, it should be windows-1252
 
Thank for your help :)

BDD => http://puu.sh/1a1OH.jpg
Xenforo => http://puu.sh/1a1NS.jpg
IPBoard => http://puu.sh/1a1Ol.jpg

I have:
Code:
        if (!$errors)
        {
            $defaultCharset = $db->fetchOne("
                SELECT IF(conf_value = '' OR conf_value IS NULL, conf_default, conf_value)
                FROM {$config['db']['prefix']}core_sys_conf_settings
                WHERE conf_key = 'gb_char_set'
            ");
            if (!$defaultCharset || str_replace('-', '', strtolower($defaultCharset)) == 'iso88591')
            {
                $config['charset'] = 'windows-1252';
            }
            else
            {
                $config['charset'] = strtolower($defaultCharset);
            }
        }

              // I add your code :
              errors[] = $config['charset'];

        return $errors;
    }

It's good ?
 
Thank for your help :)

BDD => http://puu.sh/1a1OH.jpg
Xenforo => http://puu.sh/1a1NS.jpg
IPBoard => http://puu.sh/1a1Ol.jpg

I have:
Code:
        if (!$errors)
        {
            $defaultCharset = $db->fetchOne("
                SELECT IF(conf_value = '' OR conf_value IS NULL, conf_default, conf_value)
                FROM {$config['db']['prefix']}core_sys_conf_settings
                WHERE conf_key = 'gb_char_set'
            ");
            if (!$defaultCharset || str_replace('-', '', strtolower($defaultCharset)) == 'iso88591')
            {
                $config['charset'] = 'windows-1252';
            }
            else
            {
                $config['charset'] = strtolower($defaultCharset);
            }
        }
 
              // I add your code :
              errors[] = $config['charset'];
 
        return $errors;
    }

It's good ?
Yes it's good. The purpose is just to debug. What is the charset displayed?
 
May be try to change:
Code:
        $this->_sourceDb = Zend_Db::factory('mysqli',
            array(
                'host' => $config['db']['host'],
                'port' => $config['db']['port'],
                'username' => $config['db']['username'],
                'password' => $config['db']['password'],
                'dbname' => $config['db']['dbname']
            )
        );
to
Code:
        $this->_sourceDb = Zend_Db::factory('mysqli',
            array(
                'host' => $config['db']['host'],
                'port' => $config['db']['port'],
                'username' => $config['db']['username'],
                'password' => $config['db']['password'],
                'dbname' => $config['db']['dbname'],
                'charset' => 'utf8'
            )
        );

It's one of the difference with the phpbb importer.
 
XenForo offers a paid Installation service. Perhaps they would be able to migrate your database if you ask them?
I recommend you to contact the support again.

Done, but I'm not paying while I just buy XenForo 175$, it's a technical bug of xenforo code if my database is ok.
And everything seems to be good on my side.

In short, the support is included in the price and I hope that this problem will be solved because at the moment I can not use XenForo if I can not import my community.
 
You know what's weird. This script omits the accented 'e' in the output:

Code:
<?phpinfo

$string = 'Règles du forum';

echo 'normal: ' . $string . '<br />';

I'm afraid I don't know much about character encoding stuff, and Google isn't turning up anything useful in this case. I have played with the code but no solution is forthcoming.
 
If I spend my database ipboard.sql, you can try to change things other than utf8 to try to get at least the strange characters that I could replace manually with a script?
 
In reference to this code from the IPB importer:

library/XenForo/Importer/IPBoard.php

Code:
		if (!$errors)
		{
			$defaultCharset = $db->fetchOne("
				SELECT IF(conf_value = '' OR conf_value IS NULL, conf_default, conf_value)
				FROM {$config['db']['prefix']}core_sys_conf_settings
				WHERE conf_key = 'gb_char_set'
			");
			if (!$defaultCharset || str_replace('-', '', strtolower($defaultCharset)) == 'iso88591')
			{
				$config['charset'] = 'windows-1252';
			}
			else
			{
				$config['charset'] = strtolower($defaultCharset);
			}
		}

In Zephyr's case the IPB database has no conf_value defined so it's using the conf_default which is UTF-8 in his database. If the data is not UTF-8 then that's a problem as cclaerhout said.

I am going to suggest that you replace the above code with this:

Code:
		if (!$errors)
		{
			$config['charset'] = 'windows-1252';
		}

That will force a source encoding of windows-1252 to correct what appears to be a misreported encoding in your IPB database. That may fix your problem (after you run the import again).
 
Top Bottom