This project is read-only.

InsertText Debug

Topics: Developer Forum
Jan 31, 2012 at 1:39 PM

由于中文字符的原因,InsertText模块不能正常插入中文字符

InsertText Class CAN'T Insert rightly if the words within Chinese character.

将Length改为Encoding.GetByteCount处理便可解决问题

Change Length into Encoding.GetByteCount can deal this problem well.

原文:

Before:

public Range InsertText(string text)

{
	NativeInterface.AddText(text.Length, text);
	return GetRange(_caret.Position, text.Length);
}

改后:

Right:

public Range InsertText(string text)
{
	NativeInterface.AddText(Encoding.GetByteCount(text), text);
	return GetRange(_caret.Position,Encoding.GetByteCount(text));
}

By the way....When the High version can be pushed ::>.<::

Jan 31, 2012 at 1:48 PM

Hi...all ^_^

I found that such like this problem happends on other CLASSes!!

e.g.AppendText

Jan 31, 2012 at 8:54 PM

Is there any chance you could identify a list of places where this needs to be changed?

Also, what do you mean by "When the High version can be pushed"?

Feb 1, 2012 at 3:09 AM
blah38621 wrote:

Is there any chance you could identify a list of places where this needs to be changed?

Also, what do you mean by "When the High version can be pushed"?

1.such like this bug can be seen @FindReplace Class @Append Class

2.maybe there's something wrong with me...i can't find the way to change "Whitespace-->Mode",how to set it when the exe is running??

3.I can found InsertText,but I can't find DeleteText,,,,,It's very necessary for me and i found that it's very difficult to set the pos.

 

about"When the High version can be pushed"...I am looking forward to hearing of the infomation about the 2.3 version,it has been stoped since 2009

Feb 1, 2012 at 8:59 PM

This issue should now be fixed in all branches except 1.2, where I don't know if the issue even exists.

Feb 2, 2012 at 2:54 AM

since.....2009  :(