我正在尝试构建一个(测试)
WideString
,其中包含以下内容:
但是我使用了它的分解形式:
LATIN SMALL LETTER A (U+0061) COMBINING ACUTE ACCENT (U+0301)
因此,我有以下代码片段:
var
test: WideString;
begin
test := #$0061#$0301;
MessageBoxW(0, PWideChar(test), 'Character with diacratic', MB_ICONINFORMATION or MB_OK);
end;
但实际情况是它似乎不起作用:
这可能是MessageBox
的一个漏洞,但我认为更有可能是我的代码有问题。
我尝试了一些其他变化:
test := WideString(#$0061#$0301);
const
SmallLetterLatinAWithAcuteDecomposed: WideString = #$0061#$0301;
test := SmallLetterLatinAWithAcuteDecomposed
test := #$0061+#$0301; (Doesn't compile; incompatible types)
test := WideString(#$0061)+WideString(#$0301); (Doesn't compile; crashes compiler)
test := 'a'+WideString(#$0301); (Doesn't compile; crashes compiler)
//Arnauld's thought:
test := #$0301#$0061;