I have legacy system running MySQL 5.0.67.
Columns collation is set to latin1_swedish_ci.
PHP scripts that get data from DB and generates page with charset=windows-1257
.
In PHP page language specific characters are shown correctly.
When I look directly into DB data I can see that these characters are not shown properly. I see Rûta instead of Rūta, Agnë instead of Agnė.
I can't write to database or change its parameter.
When I run
SELECT a.Name COLLATE cp1257_general_ci FROM agent a
i get error
COLLATION 'cp1257_general_ci' is not valid for CHARACTER SET 'latin1'
How to get data from db with proper characters?
EDIT:
SHOW VARIABLES LIKE '%char%';
character_set_client latin1
character_set_connection latin1
character_set_database cp1257
character_set_filesystem binary
character_set_results
character_set_server latin1
character_set_system utf8
character_sets_dir /usr/local/share/mysql/charsets/
and
show variables like 'collation%';
collation_connection latin1_swedish_ci
collation_database cp1257_lithuanian_ci
collation_server latin1_swedish_ci