Issue Bug Closed

#14848utf-8 data gets converted to utf-8 again under MySQL 4.1.11

Jorgo S. 07/05/05, 19:25 updated 08/12/06, 14:16

Description

a) MySQL 4.1.11 – typo3 database charset UTF-8; Typo3 backend forced to UTF-8

Upon entering text with special characters (accents, etc., in my case, I am using Japanese symbols), the database refuses to accept the entered text with error 102 (“These fields are not properly updated in database: (bodytext) Probably value mismatch with fieldtype.”)

The reason being most probably MySQL bug #9091 – http://bugs.mysql.com/bug.php?id=9091 – :
Upon entering Utf-8 characters, MySQL is not properly notified of the format and tries to convert the characters to UTF-8 again, resulting in a change from 2bit characters to 4bit characters.

Likely solution (as suggested in the MySQL bug article):
“right after you connect and just before you do any inserts or selects on your tables, do a SET NAMES ‘utf8’, which will ensure that mysql doesn’t reencode already encoded utf8”.

b) The same setup as above, but with typo3 mysql database set to latin1

Doing a database dump without charset parameters and inserting the table again results in conversion/loss of utf-8 characters. This might be because the default charset for MySQL 4.1.x is utf-8, I am not sure if this issue is the same as above.

(issue imported from #M1262)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.