Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Problem with utf-8/Serbian(Latin)
Problem with utf-8/Serbian(Latin) [message #1276] Tue, 04 March 2008 02:47 Go to next message
Jovan is currently offline  Jovan
Messages: 24
Registered: February 2008
Location: Serbia
Junior Member

When I input with NEW row with Serbian(Latin) everything is good, I see special characters šđžčćŠĐŽČĆ, but when I return control on previous screen program jump on login screen without error massage.

Next time when I run LIST1 for this table I see special characters in specified table, but process repeat when I try to escape from this screen, program jump on the login screen. Only way to solve the problem is to access directly to MySQL and change it.

Other php applications like wiki which I have, work properly with Serbian(Latin)

My release is 1.34.00 (beta), you remember you sent me to solve problem with dbprefix.

This problem I had also when I try last year in previous release of Radicore, but I was in process of learning Radicore concept.
------------------------------------------------------------ -
In PHP default_charset is UTF-8
------------------------------------------------------------ -
Status of Database :

mysql> status
--------------
mysql Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i486) using readline 5.2

Connection id: 9
Current database: inst_institut
Current user: jovan@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.45-Debian_1ubuntu3.1-log Debian etch distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: utf8
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 24 min 45 sec
------------------------------------------------------------ -----


Jovan
Re: Problem with utf-8/Serbian(Latin) [message #1277 is a reply to message #1276] Tue, 04 March 2008 06:36 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2276
Registered: April 2006
Location: Surrey, UK
Senior Member
This is very strange. I have tried it on my development PC using the XAMPLE subsystem to create a new 'option' record with an id of 'serbian' and a description of 'šđžčćŠĐŽČĆ'. After creating the record it returns to the list screen without a problem, and I can page back and forth through the entries without any problems.

However, when I log on to Radicore and try to do the same thing with the demonstration system I see the behaviour which you describe. I am using the same versions of PHP and MySQL, so something else which is different between the two installations must be causing this error. The only differences are:
- my PC is running Windows XP without the Zend Accelerator
- the Radicore site is running linux with the Zend Accelerator

I will have to investigate further to find out what is causing this, but without the ability to duplicate this error on my development PC it is going to be difficult.

FYI my method of dealing with all the different languages is to use the UTF8 character set throughout:
- I set default_charset to 'UTF-8' in the htaccess file.
- after connecting to the database I use the query "SET names 'UTF8'" to define the character set for the connection.
- all databases, tables and columns have the collation set to 'utf8_unicode_ci'.


Re: Problem with utf-8/Serbian(Latin) [message #1278 is a reply to message #1277] Tue, 04 March 2008 06:52 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2276
Registered: April 2006
Location: Surrey, UK
Senior Member
I have just found the cause of this problem. The AUDIT database on the Radicore site (and all its tables and columns) was created with a collation of latin1_swedish_ci instead of utf8_unicode_ci. This caused some sort of error when trying to write to the php_session table which automatically terminated the session and jumped back to the logon screen. By changing the collation of all the tables and columns I have made the problem disappear.

It is important that ALL databases, ALL tables and ALL columns have the same collation, and the best one to deal with multiple languages is utf8_unicode_ci.


Re: Problem with utf-8/Serbian(Latin) [message #1279 is a reply to message #1276] Tue, 04 March 2008 08:16 Go to previous messageGo to next message
Jovan is currently offline  Jovan
Messages: 24
Registered: February 2008
Location: Serbia
Junior Member

Thank you,

I changed collation in all columns through AUDIT db, and everything works. Is it necessary to change collation on the level of table also, or it is not important ?


Jovan
Re: Problem with utf-8/Serbian(Latin) [message #1280 is a reply to message #1279] Tue, 04 March 2008 08:46 Go to previous message
AJM is currently offline  AJM
Messages: 2276
Registered: April 2006
Location: Surrey, UK
Senior Member
I have discovered that it you set the collation for the database, then this will be used for each new table that you create. If you set the collation for the table then this will be used for each new column that you create.

It is possible, using phpMyAdmin for example, to set the default collation for the connection, which means that this will be used as the default for each database, each table and each column, thus removing the need to update column settings afterwards.


Previous Topic: Radicore v1.33.0/Search sort problem
Next Topic: Problem in Delete Operation
Goto Forum:
  


Current Time: Thu Dec 09 09:26:53 EST 2021

Total time taken to generate the page: 0.01138 seconds