Dear Neil,

   This is because the new code is assuming text is NUL terminated. It
isn't NUL terminated and the len argument should be used to find its
length.

Great! Now it works! Thanks a lot!
To make full use of system ANSI codepage ability, I optimize the process like this:
if(IsNT() || nCodePage==0 || b9xACPSame){
  ::ExtTextOut(hdc, rc.left, ybase, ETO_OPAQUE, &rcw, s,
     Platform::Minimum(len, maxLenText), NULL);
} else {
  ... // Unicode conversion
}

void SurfaceImpl::SetDBCSMode(int codePage) {
 // No action on window as automatically handled by system.
 nCodePage = codePage;
if(!IsNT() && ((unsigned int)nCodePage == GetACP()))
    b9xACPSame = true;
 else
    b9xACPSame = false;
}

May I upload the new patch to CVS? And the path?
If Scintilla or sourceforge CVS has any limitation or rules, please inform.

Jeffrey Ren

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to