SN-10146 附来源、原文与上下文。
明白,我会改成这样,免得再被弄坏:
Right, I'll change it to this so it doesn't get broken again:
if (str.Find('\xC2') != wxNOT_FOUND)
str.Remove(str.Find('\xC2'), 1);
if (str.Find('\xC2') != wxNOT_FOUND)
str.Remove(str.Find('\xC2'), 1);
引用 Martti Malmi 的文字Martti Malmi来源 ↗我没有有意改它,一定是某种编码问题。
I didn't change it knowingly, must have been some encoding problem.
引用中本聪此前的文字中本聪来源 ↗为什么作这个改动?
What was the reason for this change?
#if !wxUSE_UNICODE ... if (str.Find('Â') != wxNOT_FOUND) str.Remove(str.Find('Â'), 1); 改为: if (str.Find('�') != wxNOT_FOUND) str.Remove(str.Find('�'), 1);
#if !wxUSE_UNICODE ... if (str.Find('Â') != wxNOT_FOUND) str.Remove(str.Find('Â'), 1); to: if (str.Find('�') != wxNOT_FOUND) str.Remove(str.Find('�'), 1);
wxFormBuilder 会自动把 (c) 符号转成 UTF-8。在 wxWidgets-2.8.9 ansi 中,它会显示为版权符号,外加一个多余的乱码字符,这个变通处理就是用来修复非 unicode(ansi)情况下的问题。
wxFormBuilder turns the (c) symbol into UTF-8 automatically. On wxWidgets-2.8.9 ansi, it shows as a copyright symbol with an extra trash character, which this hack fixes up for the non-unicode (ansi) case.