1089 |
|
var s: RawByteString; |
1090 |
|
begin |
1091 |
|
s := AValue; |
1092 |
< |
if StringCodePage(Value) <> CodePage then |
1092 |
> |
if StringCodePage(s) <> CodePage then |
1093 |
|
SetCodePage(s,CodePage,CodePage<>CP_NONE); |
1094 |
|
inherited SetAsString(s); |
1095 |
|
end; |
1208 |
|
s: RawByteString; |
1209 |
|
begin |
1210 |
|
Buffer := nil; |
1211 |
< |
IBAlloc(Buffer, 0, Size + 1); |
1211 |
> |
IBAlloc(Buffer, 0, DataSize); |
1212 |
|
try |
1213 |
|
s := Value; |
1214 |
|
if StringCodePage(s) <> CodePage then |
1215 |
|
SetCodePage(s,CodePage,CodePage<>CP_NONE); |
1216 |
< |
StrLCopy(Buffer, PChar(s), Size); |
1216 |
> |
StrLCopy(Buffer, PChar(s), DataSize-1); |
1217 |
|
if Transliterate then |
1218 |
|
DataSet.Translate(Buffer, Buffer, True); |
1219 |
|
SetData(Buffer); |
3819 |
|
their values } |
3820 |
|
SQL_VARYING, SQL_TEXT: |
3821 |
|
begin |
3822 |
< |
FirebirdAPI.CharSetWidth(getCharSetID,CharSetSize); |
3823 |
< |
CharSetName := FirebirdAPI.GetCharsetName(getCharSetID); |
3824 |
< |
FirebirdAPI.CharSetID2CodePage(getCharSetID,FieldCodePage); |
3822 |
> |
if not Database.Attachment.CharSetWidth(getCharSetID,CharSetSize) then |
3823 |
> |
CharSetSize := 1; |
3824 |
> |
CharSetName := Database.Attachment.GetCharsetName(getCharSetID); |
3825 |
> |
Database.Attachment.CharSetID2CodePage(getCharSetID,FieldCodePage); |
3826 |
|
FieldSize := GetSize div CharSetSize; |
3827 |
|
FieldType := ftString; |
3828 |
|
end; |
3884 |
|
FieldSize := sizeof (TISC_QUAD); |
3885 |
|
if (getSubtype = 1) then |
3886 |
|
begin |
3887 |
< |
FirebirdAPI.CharSetWidth(getCharSetID,CharSetSize); |
3888 |
< |
CharSetName := FirebirdAPI.GetCharsetName(getCharSetID); |
3889 |
< |
FirebirdAPI.CharSetID2CodePage(getCharSetID,FieldCodePage); |
3887 |
> |
if not Database.Attachment.CharSetWidth(getCharSetID,CharSetSize) then |
3888 |
> |
CharSetSize := 1; |
3889 |
> |
CharSetName := Database.Attachment.GetCharsetName(getCharSetID); |
3890 |
> |
Database.Attachment.CharSetID2CodePage(getCharSetID,FieldCodePage); |
3891 |
|
FieldType := ftMemo; |
3892 |
|
end |
3893 |
|
else |