android multibyte Language TextInput Problem

Cocos2dxGLSurfaceView.java
@
public void afterTextChanged(Editable s) {
if (isFullScreenEdit()) {
return;
}

LogD(“afterTextChanged:” + s);
int nModified = s.length() - mText.length();
LogD(“nModified:” + nModified);
if (nModified > 0) {
// mori
int nInsertStart = mText.length();
if(nInsertStart > 0)
{
mMainView.deleteBackward();
nInsertStart—;
}
final String insertText = s.subSequence(nInsertStart, s.length()).toString();
mMainView.insertText(insertText);
LogD(“insertText(” + insertText + “)”);
}
// mori
else if(nModified == 0){
final String insertText1 = s.subSequence(mText.length()–1, s.length()).toString();
mMainView.deleteBackward();
mMainView.insertText(insertText1);
LogD(“insertText(” + insertText1 + “)”);
}
else {
for (; nModified < 0; ++nModified) {
mMainView.deleteBackward();
LogD(“deleteBackward”);
}
}
mText = s.toString();
}@

I hope to added mMainView.SetString(s.toString) Function

Thank you.
Could you explain what is the problem?

I hope to added mMainView.SetString Function
Why did you want this function? Are all developers need it? If not, you can modify the codes to satisfy your demand.

I think the problem occurs in the Combined language Such as Korean Language

input “ㅋ” —> “ㅋ” —> length 1 nModified = 1 s.toStinrg = “ㅋ” display = “ㅋ”
input “ㅗ” —> “코” —> length 1 nModified = 0 s.toStinrg = “코” display = “ㅋ”
input “ㅋ” —> “콬” —> length 1 nModified = 0 s.toStinrg = “콕” display = “ㅋ
input”ㅗ" —> “코코” —> length 2 nModified = 1 s.toStinrg = “코코” display = “ㅋ코”

Oh, it looks so difficult.