Fix: Decode geographic location as UTF-8 across client and server
Geographic location (city, country) from the geo APIs is UTF-8, but the client
and several server paths converted or stored it in the system ANSI code page,
turning umlauts ("ö"/"ä") into "?" or GBK mojibake ("B枚blingen"). Keep the
value UTF-8 end to end: the client caches it as UTF-8 and re-queries once after
an upgrade (keyed by __DATE__, the app's version convention), while the server
stores and displays it as UTF-8 in the online list, the activity log, the
client-info export, JSON/email payloads and search.
Also add a confirmation prompt before opening a remote chat from the toolbar,
with German, English and Traditional-Chinese translations.
Co-Authored-By: deepseek-v4-pro
This commit is contained in:
1 parent
1a9312d2d1
commit
d15cd77a28
11 files changed
+201
-45
No files matched your search
@@ -277,6 +277,12 @@ void CSearchBarDlg::DoSearch()
|
||||
colText = ctx->GetClientData(col);
|
||||
}
|
||||
|
||||
// 地理位置列已统一按 UTF-8 存储(见 AddList),而搜索输入是 CP_ACP;
|
||||
// 转回 CP_ACP 再比对,否则按中文位置搜索会因编码不一致而失配。
|
||||
if (col == ONLINELIST_LOCATION) {
|
||||
colText = CString(Utf8ToAnsi(std::string(colText.GetString())).c_str());
|
||||
}
|
||||
|
||||
colText.MakeLower();
|
||||
if (colText.Find(searchText) >= 0) {
|
||||
matched = true;
|
||||
|
||||
Reference in new issue
Block a user