// Original Function
// function TIBXSQLVAR.GetCharsetSize: Integer;
// begin
// case SQLVar.SQLSubtype of
// 0, 1, 2, 10, 11, 12, 13, 14, 19, 21, 22, 39,
// 45, 46, 47, 50, 51, 52, 53, 54, 55, 58 : Result := 1;
// 5, 6, 8, 44, 56, 57, 64 : Result := 2;
// 3 : Result := 3;
// 59 : Result := 4;
// else
// Result := 0;
// end;
// end;
// Fixed Function
function TIBXSQLVAR.GetCharsetSize: Integer;
begin
case SQLVar.SQLSubtype and $FF of
0, 1, 2, 10, 11, 12, 13, 14, 19, 21, 22, 39,
45, 46, 47, 50, 51, 52, 53, 54, 55, 58 : Result := 1;
5, 6, 8, 44, 56, 57, 64 : Result := 2;
3 : Result := 3;
4, 59 : Result := 4;
else
Result := 0;
end;
end;