1
DCrussader
Herve's News 1.44 and XOOPS 2.0.15 UTF8 almost ready

Months ago when XOOPS Translations was active, we (me and Herve) started a discussion - with topic News 1.44/Backend.php and UTF8).

The main problem was (and still is, but finaly is located where from comes) that each news article written in UTF-8, comes out thru backend.php like "???? ???? "

XOOPS 2.0.13.2 latest Mithrandir releases was totaly far, far away from Unicode UTF-8, no matter which patches are applied to the language files, or parts of the /includes/database.php. It was just a big mess, now ... this days comes 2.0.14 (2.0.15) which is Skalpa, better team leader then the previous, but ... anyway:
XOOPS 2.0.15 was announced as second (2.0.14 was first) XOOPS Unicode UTF-8 ready !

In fact XOOPS 2.0.14/2.0.15 is half Unicode UTF-8 ready, it can displays Unicoded content better then Mith 2.0.13.2, but is far away from really Unicode ready application.

Example:

If u create 2 different databases, one with Latin1 tables, and one with utf8_general_ci, u will see the difference :)

XOOPS 2.0.15 Installation process is fine on both databases, instead of final results, on Latin1 works perfect, with broken again RSS (cos of the storage, stored text is entered in UTF8, and saved in ISO8859-1) comes in "????" and XOOPS 2.0.15 in Latin1 RSS works (oops, ATOM - RSS 2.0 uses only UTF-8).

After a lot of tests on our local Gentoo boxes, we discovered that:

XOOPS 2.0.15 is not Unicode UTF8 compliant, it's not compatible, not fully operational, as what have to be.
XOOPS 2.0.15 can work as 2.0.13.2 thru declaration in language.php file to use UTF-8 instead of ISO8859-1, but this is not real, it's like emulation.
XOOPS 2.0.15 adds more incompatibilities to last releases of some modules, like Marcan's WF-Downloads 3, and adds (as 2.0.14) two new blocks.

Open Personal message to Herve:

My excuses for previously reported bug, the bug is not dependent of your work on News 1.44, it's XOOPS 2.0.xx core related bug. Backend.php finally (on our local boxes) shows fully operational syndication in UTF-8, but is not for public releases - such patch will brake XOOPS and 3PD compatibility.

To core dev:

Storing content information as UTF-8 encoding, but in ISO8859-1 tables will gives as allways "?????" this can be done by adding one declaration:

lines 106 - 111
function prefix($tablename='')
        {
        if ( 
$tablename != '' ) {
        return 
$this->prefix .'_'$tablename;
                
$this->prefix $table_prefix;
                @
mysql_query("SET NAMES 'utf8'"$this->_resource);
    } else {
        return 
$this->prefix;


Possibilities of two be messed this two lines:
$this->prefix $table_prefix;
                @
mysql_query("SET NAMES 'utf8'"$this->_resource);

But when I MySQL guru is back, I will ask him for the proper code change.
May The Source Be With You!

2
davidl2
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2006/9/14 9:20

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Thank you for the input DC.

Could you possibly also add a link to this on the Sourceforge bug-reporting section as well, so the above information does not get overlooked?

Thanks

3
DCrussader
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready

Cant work with SourceForge.net Bug tracker, leaving that to u - XOOPS Moderators.
May The Source Be With You!

4
Herko
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2006/9/25 10:37

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Whats wrong with the sf.net bugtracker?

Anyways, does this solve the issue with existing content encoding too? I mean, what about the hundreds of news posts that I already have that are encoded in non-UTF8 formats and saved in the news tables?

Its good to work towards a common and usable standard encoding, and UTF8 has very good papers to be named such (even tho that discussion hasn't been held for XOOPS), but if it means throwing away existing content... that'll hurt!

Herko

5
davidl2
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2006/9/25 11:23

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Well I don't understand the above technical stuff - but i've reported it for you as requested

6
irmtfan
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2006/9/25 13:20

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


I dont have this problem in my sites.
backend.php works fine with UTF-8.
http://www.jadoogaran.org/backend.php

also all tables are latin1. i dont try utf-8 tables? why useing utf-8 tables?

7
phppp
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2006/9/25 14:19

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Quote:

DCrussader wrote:
Cant work with SourceForge.net Bug tracker,

What was the problem for you?

8
davidl2
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2006/9/25 19:57

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26



9
Anonymous
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2007/3/28 16:29

  • Anonymous

  • Posts: 0

  • Since:


Hi DCrussader,

May be this will help you with your MySQL db:
alter table xoops_stories charset=utf8;



10
Anonymous
Re: Herves News 1.44 and XOOPS 2.0.15 UTF8 almost ready
  • 2007/5/1 16:13

  • Anonymous

  • Posts: 0

  • Since:


Hi,

This is another converting script:
header('Content-type: text/plain;');
mysql_connect('localhost','db_user','db_pass');
mysql_select_db('db_name');
$res mysql_query("SHOW TABLES");
while (
$r mysql_fetch_array($res)){
  
$tablename $r[0];
  echo 
$sql "ALTER TABLE $tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
  echo 
"rn";
mysql_query($sql);
}
?>

Login

Who's Online

218 user(s) are online (28 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

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

Latest GitHub Commits