开发者

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

开发者 https://www.devze.com 2023-04-12 17:47 出处:网络
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

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.开发者_如何学Go0.3 is used. This version uses

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


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.


Export your database to an sql file. Doesn't matter if all letters are like Chinese (no offense :)) then use the command below to convert your file.

http://en.wikipedia.org/wiki/Iconv

Then open your file. You'll see all characters are proper.


You want to use UTF8 General. I've found that it covers most of what you'll ever need.


Found a solution:

Ä[008D]

Open Notepad++. Type in your letter (č). Encode in ANSI. It shows only a Ä but if you copy and paste you get the code above (the rectangle is not show, but it contains the values 00AD).

Despite that it still not works, but the question should be answered.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号