-- 检查用户表数据编码
SELECT 
    id,
    username,
    real_name,
    HEX(real_name) as real_name_hex,
    LENGTH(real_name) as real_name_length,
    CHAR_LENGTH(real_name) as real_name_char_length,
    phone,
    role,
    create_time
FROM user
WHERE id IN (1, 2)
ORDER BY id;

-- 检查数据库和表的字符集
SHOW CREATE TABLE user;

-- 检查数据库字符集
SELECT 
    SCHEMA_NAME,
    DEFAULT_CHARACTER_SET_NAME,
    DEFAULT_COLLATION_NAME
FROM information_schema.SCHEMATA
WHERE SCHEMA_NAME = 'peidu';
