文字コード確認・変更
CautionDatabase character sets
SHOW VARIABLES LIKE 'character_set%';
Checks charsets at every layer — mojibake and emoji errors end when everything agrees on utf8mb4.
Examples
ALTER TABLE posts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_ja_0900_as_cs;Convert to utf8mb4
Syntax
SHOW VARIABLES LIKE 'character%'; / ALTER TABLE t CONVERT TO CHARACTER SET utf8mb4;
Before you run it
Conversions rebuild; back up first.
Related commands
- iconvConvert encodings
- ALTER TABLEAlter table structure
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store