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); |