code:function TMBCSEncoding.GetCharCount(Bytes: PByte; ByteCount: Integer): Integer; begin Result := UnicodeFromLocaleChars(FCodePage, FMBToWCharFlags, PAnsiChar(Bytes), ByteCount, nil, 0); end;
http://www.delphikingdom.com/asp/answer.asp?IDAnswer=83633