i18n: UTF-8 protocol capability + Unicode rendering on server

This commit is contained in:
yuanyuanxiang
2026-05-06 16:01:16 +02:00
parent 11434653e9
commit 0aa75882d1
11 changed files with 361 additions and 40 deletions

View File

@@ -96,6 +96,14 @@ extern CMy2015RemoteDlg* g_2015RemoteDlg;
// 注意m_bEnableFileV2 是 CMy2015RemoteDlg 的成员变量
bool SupportsFileTransferV2(context* ctx);
// 获取客户端协议字符串编码 (CP_UTF8 或 936)。
// 适用于任意 context
// - 主连接:直接读自身的 CAPABILITIES
// - 子连接KeyBoardDlg / SystemDlg / FileManagerDlg 等CAPABILITIES 为空,
// 通过 peer IP 查 m_HostList 中的主连接获取能力位
// 找不到主连接或老客户端:默认 CP936覆盖 95% 简中/英语 ASCII 老客户端)。
UINT GetClientEncoding(context* ctx);
// 服务端待续传的传输信息
struct PendingTransferV2 {
uint64_t clientID;
@@ -344,7 +352,13 @@ public:
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnExitSizeMove();
afx_msg void OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnGetDispInfo(NMHDR* pNMHDR, LRESULT* pResult); // 虚拟列表数据回调
afx_msg void OnGetDispInfo(NMHDR* pNMHDR, LRESULT* pResult); // 虚拟列表数据回调A 版,备用)
afx_msg void OnGetDispInfoW(NMHDR* pNMHDR, LRESULT* pResult); // 虚拟列表数据回调W 版,启用 LVM_SETUNICODEFORMAT 后实际触发的)
// "活动窗口"列的宽字符旁路表clientID -> Unicode 标题。
// 协议字段 hb.ActiveWnd 已约定为 UTF-8老客户端 GBK 回退),由服务端解码后存入。
// 由 m_cs 保护。
std::map<uint64_t, std::wstring> m_ActiveWndW;
afx_msg void OnOnlineMessage();
afx_msg void OnOnlineDelete();
afx_msg void OnOnlineUpdate();