Code: Select all
function TXc12DataSST.AddString(AText: AxUCString): integer;
...
if IsUnicode(AText) then
P := MakeString(AText)
else
P := MakeCompressedString(AText); // always goes here, despite that AText = 'Hüco'
...
end;
......
function TXc12DataSST.IsUnicode(const S: AxUCString): boolean;
var
i: integer;
W: word;
begin
if not FCompress then
Result := True
else begin
for i := 1 to Length(S) do begin
W := Word(S[i]); // This is not tested. Need a multibyte char.
if ((W and $FF00) <> 0){ or (ByteType(S[i], 1) <> mbSingleByte)} then begin
Result := True;
Exit;
end;
end;
Result := False;
end;
end;
AText = 'Hüco'
So it is never recognized as unicode. Why?
XLSRWII 5 is the issue.