959 |
|
if UseDefaultSystemCodePage then |
960 |
|
begin |
961 |
|
{$ifdef WINDOWS} |
962 |
< |
if FirebirdAPI.CodePage2CharSetID(GetACP,CharSetID) then |
963 |
< |
TempDBParams.Values['lc_ctype'] := FirebirdAPI.GetCharsetName(CharSetID) |
962 |
> |
if Attachment.CodePage2CharSetID(GetACP,CharSetID) then |
963 |
> |
TempDBParams.Values['lc_ctype'] := Attachment.GetCharsetName(CharSetID) |
964 |
|
{$else} |
965 |
< |
if FirebirdAPI.CodePage2CharSetID(DefaultSystemCodePage,CharSetID) then |
966 |
< |
TempDBParams.Values['lc_ctype'] := FirebirdAPI.GetCharsetName(CharSetID) |
965 |
> |
if Attachment.CodePage2CharSetID(DefaultSystemCodePage,CharSetID) then |
966 |
> |
TempDBParams.Values['lc_ctype'] := Attachment.GetCharsetName(CharSetID) |
967 |
|
{$endif} |
968 |
|
else |
969 |
|
TempDBParams.Values['lc_ctype'] :='UTF8'; |
976 |
|
end; |
977 |
|
|
978 |
|
FDefaultCharSetName := AnsiUpperCase(TempDBParams.Values['lc_ctype']); |
979 |
– |
if FDefaultCharSetName <> '' then |
980 |
– |
FirebirdAPI.CharSetName2CharSetID(FDefaultCharSetName,FDefaultCharSetID); |
981 |
– |
FirebirdAPI.CharSetID2CodePage(FDefaultCharSetID,FDefaultCodePage); |
979 |
|
{ Generate a new DPB if necessary } |
980 |
|
if (FDBParamsChanged or (TempDBParams.Text <> FDBParams.Text)) then |
981 |
|
begin |
1029 |
|
raise EIBInterBaseError.Create(Status); |
1030 |
|
end; |
1031 |
|
until FAttachment <> nil; |
1032 |
+ |
|
1033 |
+ |
if FDefaultCharSetName <> '' then |
1034 |
+ |
Attachment.CharSetName2CharSetID(FDefaultCharSetName,FDefaultCharSetID); |
1035 |
+ |
Attachment.CharSetID2CodePage(FDefaultCharSetID,FDefaultCodePage); |
1036 |
+ |
|
1037 |
|
if not (csDesigning in ComponentState) then |
1038 |
|
FDBName := aDBName; {Synchronise at run time} |
1039 |
|
FDBSQLDialect := GetDBSQLDialect; |