1
franfran
mysql 4.1.7 and utf8 problem
  • 2005/1/7 7:56

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


Hi,

Previously I have posted my problem in another thread:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=29446

However, I have discovered it is indeed a character set problem. So I start a new topic in here.

With my config below, install a new XOOPS and a new database I get 'blank content' on all modules display:

-- CONFIG --
REDHAT 9.0
APACHE 2.0.48
PHP 4.3.10
MYSQL 4.1.7

under my.cnf:
[mysqld]
set-variable = default-character-set=utf8

under xoops->global.php:
define('_CHARSET''utf-8');

define('_CHARSET''utf-8');

-- CONFIG END --

After the installation, the collation of the tables are utf8. In this case, when you browse your site, the smarty will generate all modules block, however, their content are blank, only title displayed.

screenshot:
http://www.angelfire.com/linux/franfran/xoopsblank.gif
You may copy and paste the link above to your browser

If collation is utf8_general_ci, the modules would be blank. If collcation is latin, everything is fine.

Everything is fine if running MySQL 4.1.0, collation utf8

Did I make a mistake somewhere?
Thank you.

2
danielh2o
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/7 8:41

  • danielh2o

  • Just popping in

  • Posts: 47

  • Since: 2004/10/19


I maynot help you but what langcode are you using for display? multi-bytes?

for example
/%%%%%        LANGUAGE SPECIFIC SETTINGS   %%%%%
define('_CHARSET''UTF-8');
define('_LANGCODE''zh-tw');

// change 0 to 1 if this language is a multi-bytes language
define("XOOPS_USE_MULTIBYTES""1");

3
franfran
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/7 10:01

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


Yes, I have the following set:

define("XOOPS_USE_MULTIBYTES", "1");

Also, in apache, I have the following as well:
AddDefaultCharset UTF-8

thanks.

4
franfran
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/12 9:58

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


I am hoping someone could answer my question..
What I am looking for is an official confirmation.. at least I want to know I did right or wrong..

please somebody confirm with me:

XOOPS on MySQL 4.1.7 with utf8 is NOT supported.

thank you..

5
franfran
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/14 10:11

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


To reproduce it:

Mysql 4.1.7
XOOPS 2.0.9
APACHE 2.0.X

under my.cnf:
[client]
set-variable = default-character-set=utf8
set-variable = character_set_client=utf8
set-variable = character_set_connection=utf8
set-variable = character_set_results=utf8

[mysqld]
set-variable = default-character-set=utf8

under xoops->global.php:
define('_CHARSET', 'utf-8');
define("XOOPS_USE_MULTIBYTES", "1");

under httpd.conf:
AddDefaultCharset UTF-8

under xoops-site/class/database/mysqldatabase.php, function: connect, add the following before 'return true':

+ mysql_query("SET CHARACTER SET utf8", $this->conn);


1. create XOOPS database
2. grant permission and make sure PHP can connect to it.
3. install XOOPS as normal
4. after the installation, verify all tables are in UTF8, you should see the collation is utf8_general_ci
5. check your homepage, all modules are blank

e.g.(copy and paste the link in your browser):
http://www.angelfire.com/linux/franfran/xoopsblank.gif

Thank you.

6
irmtfan
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/14 10:47

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


i always think MySQL 4.1+ has a better performance for multi-byte charsets until i see this topic.
IMHO no need for choose a character set in database:
set-variable = default-character-set=utf8

i try to install xampp in local host and test it carfully then tell you the result.

7
m0nty
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/14 11:32

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i can confirm that XAMPP sets default character set of mysq to collation = utf-8

and the problem does occur as mentioned in this thread..

i had to use sql administrator and change the default character set of MySQL to latin1 and then XOOPS worked perfect..

8
irmtfan
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/14 11:50

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


ok i test it.
php 4.3.10 and 5.0.3
apache 2.0.52
mysql 4.1.7
xoops 2.0.9.2
i dont know what is your problem but in local everything is ok.

edit:
MySQL connection collation is : utf8-bin

9
franfran
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/15 8:25

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


um.. I am using utf8_general_ci, haven't try utf8_bin before.. I may try it out tomorrow.
however, as m0nty got the same result. what charset you used? utf8_general_ci??

For those interested, I have another thread in here:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=29446

The problem should occured in tpl->assign function.
However, I cannot find out what is the problem, as I am not core/technical enough to understand it.

btw, thank you very much. hope more member will mention this thread.

10
saigonpilots
Re: mysql 4.1.7 and utf8 problem

Hi all,
I hope the developers will add the standard "internationalized" piece of codes such as define utf-8 as default charset. Would be very helpful.

Login

Who's Online

199 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 199


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits