I'm trying to deal with an old server that was resurrected after many years. The problem is that the DB is in a weird state.
The website reads the information from the DB with charset ="windows-1251". The the whole table and the fields in the table seen in phpMyAdmin have collation "cp-1251", which I think is the same as windows=1251. If the text is written in latin everything is displayed properly, but if I write the text in Bulgarian it won't work. Any ideas how to fix the DB issue? I have access to the phpMyAdmin & the admin panel of the website.
I was thinking to switch the charset & collation to utf-8 but I get "?" everywhere. Also I looked up similar websites and I saw that they were using charset = windows-1251 for the same fields, which makes me think that the data in the table is not right.
Either use MySQL's CHARACTER SET utf8
or cp1251
.
You will need to switch to that charset throughout
set_charaset()
in PHP)CHARACTER SET ...
)For further discussion of the question marks, see Trouble with utf8 characters; what I see is not what I stored
In particular, the data was lost as you stored it into the table.