Search code examples
mysqlencodingcharacterletter

What is the encoding for the character č for a MYSQL3 database?


I have here an old MySQL3 database with an encoding problem. Since the system should be replaced I need a fix. I have to input the character č. But what is the encoding for that? For

ä -> ä
ö -> ö
ü -> ü

But I need a calculator/map for the letter č.

The MySQL database is 3.23.49

Edit:

I think the reason is that phpMyAdmin - 2.8.0.3 is used. This version uses

<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />

Solution

  • You want to use either ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name; or ALTER TABLE t MODIFY latin1_text_col TEXT CHARACTER SET utf8; or ALTER TABLE tbl_name DEFAULT CHARACTER SET charset_name;

    Your way to ask the question makes it very clear that you have some major misunderstandings about string encodings and the relationship between strings and bytes.

    It looks to me like you want an UTF-8 character, but instead of asking which bytes that maps to, which is easy to figure out in any programming language or by knowing how UTF-8 works, you ask how that maps to characters in some one-byte fixed-width encoding, probably ISO-8859-1.