ScintillaNet InsertText中文BUG
针对版本:ScintillaNet2.2
由于中文字符的原因,InsertText模块不能正常插入中文字符
将Length改为Encoding.GetByteCount处理便可解决问题
搜索原文:
public Range InsertText(string text)
{
NativeInterface.AddText(text.Length, text);
return GetRange(_caret.Position, text.Length);
}
用以下代码替换:
public Range InsertText(string text)
{
NativeInterface.AddText(Encoding.GetByteCount(text), text);
return GetRange(_caret.Position,Encoding.GetByteCount(text));
}
顺便说下,同样的字符处理BUG也发生在查找替换模块和TextAppend模块
补充:此BUG在ScintillaNet2.5的版本中得到解决
浙公网安备 33010602011771号