Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2012-07-09 04:08:04

justwushu
Member
Registered: 2012-07-05
Posts: 8

Chinese Character Display Error

Hi,

I am going to use AdultScriptPro, in a non-adult site. It's focus is on the Chinese martial arts.

The site is in English, but sometimes Chinese characters are included in the description. At the moment, if Chinese characters are included I am getting ???, instead of the Chinese characters. If I enter the Chinese characters directly into the database, they are displayed correctly.

How can I fix it?

Thank you in advance for any answers.

Last edited by justwushu (2012-07-09 06:43:21)

Offline

#2 2012-07-09 06:57:30

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Chinese Character Display Error

Write the below code in a file and upload it to your server and then access that file from the web:

<?php
define('_VALID', true);
require 'libraries/bootstrap.php';

$db = VF::factory('database');
$db->query("ALTER DATABASE ".VF::cfg_item('db_name')."
            CHARACTER SET utf8
            DEFAULT CHARACTER SET utf8
            COLLATE utf8_general_ci
            DEFAULT COLLATE utf8_general_ci");

$db->query("SHOW TABLES");
$tables = $db->fetch_rows();
foreach ($tables as $table) {
    $name   = $table['0'];
    $db->query("ALTER TABLE ".$name."
                DEFAULT CHARACTER SET utf8
                COLLATE utf8_general_ci");
}

VF::close();
?>

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2012-07-09 09:34:49

justwushu
Member
Registered: 2012-07-05
Posts: 8

Re: Chinese Character Display Error

Thank you, it worked a treat! smile

Offline

Board footer

Powered by FluxBB