i18n: UTF-8 protocol capability + Unicode rendering on server
This commit is contained in:
@@ -60,4 +60,12 @@ public:
|
||||
if (caps.IsEmpty()) return false;
|
||||
return (strtoul(caps.GetString(), nullptr, 16) & CLIENT_CAP_V2) != 0;
|
||||
}
|
||||
|
||||
// 检查客户端是否使用 UTF-8 协议字符串编码。
|
||||
// 无此能力位的老客户端:服务端按 CP_ACP(CP936,覆盖 95% 的简中/英语 ASCII 老客户端)解读。
|
||||
bool SupportsUtf8() const {
|
||||
CString caps = GetClientData(ONLINELIST_CAPABILITIES);
|
||||
if (caps.IsEmpty()) return false;
|
||||
return (strtoul(caps.GetString(), nullptr, 16) & CLIENT_CAP_UTF8) != 0;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user