MySQL and cp1251 entries ...
Posted: Wed Jan 25, 2006 8:05 pm
Hello,
I did experiments on another PC with this configuration:
Windows XP SP1 / Apache 2.0.55 / PHP 5.1.2 / MySQL 5.0.18 / s9y_200601251437.tar.gz .
I installed MySQL in C:\MySQL.
mysql.ini:
The confguratrion of serendipity:
Apache mod_rewrite,
Bulgarian language
Native (not UTF-8!!)
user settings: Bulgarian language.
What happened:
I was able to enter entries in English (latin letters).
When I tried to enter an entry that has Cyrillic letters in the title or in the body, this error occurs, and it is MySQL error: Even one cyrillic letter is sufficient to generate this error. It is obvious that data is NOT too long indeed.
This does not happen with my 'official' installation with MySQL 4.1.14/ PHP 5.0.2.
Then I tried with the MySQL command-line client and another database (not s9y) and saw this error when entering cyrillic fields. set names 'cp1251' made this error to not occur.
I realize that I could make errors there, but if not this may be a hint for s9y improvement. This is why I posted here in 'Development' and not in 'Bugs' or 'General issues'.
Regards,
I did experiments on another PC with this configuration:
Windows XP SP1 / Apache 2.0.55 / PHP 5.1.2 / MySQL 5.0.18 / s9y_200601251437.tar.gz .
I installed MySQL in C:\MySQL.
mysql.ini:
Code: Select all
[mysql]
default-character-set=cp1251
.....
[mysqld]
default-character-set=cp1251
...Apache mod_rewrite,
Bulgarian language
Native (not UTF-8!!)
user settings: Bulgarian language.
What happened:
I was able to enter entries in English (latin letters).
When I tried to enter an entry that has Cyrillic letters in the title or in the body, this error occurs, and it is MySQL error:
Code: Select all
Грешка:
INSERT INTO serendipity_entries (title,timestamp,body,extended,isdraft,allow_comments,moderate_comments,exflag,comments,last_modified,author,authorid) values ('България', '1138212885', 'Български', '', 'false', 'true', 'false', '0', '0', '1138212885', 'imc', '1')
/ Data too long for column 'title' at row 1
This does not happen with my 'official' installation with MySQL 4.1.14/ PHP 5.0.2.
Then I tried with the MySQL command-line client and another database (not s9y) and saw this error when entering cyrillic fields. set names 'cp1251' made this error to not occur.
I realize that I could make errors there, but if not this may be a hint for s9y improvement. This is why I posted here in 'Development' and not in 'Bugs' or 'General issues'.
Regards,