mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Set to ordinary space in case of known broken chars #160 and #226, which originate from a multi byte char Refs #2325
64 lines
2.1 KiB
ObjectPascal
64 lines
2.1 KiB
ObjectPascal
program heidisql;
|
|
|
|
{$mode delphi}{$H+}
|
|
|
|
uses
|
|
{$IFDEF UNIX}
|
|
cthreads,
|
|
{$ENDIF}
|
|
{$IFDEF HASAMIGA}
|
|
athreads,
|
|
{$ENDIF}
|
|
Interfaces, // this includes the LCL widgetset
|
|
SysUtils, Dialogs,
|
|
Forms, printer4lazarus, datetimectrls, LCLTranslator, Translations,
|
|
{ you can add units after this }
|
|
main, apphelpers, dbconnection;
|
|
|
|
{$R *.res}
|
|
|
|
var
|
|
AppLanguage: String;
|
|
begin
|
|
PostponedLogItems := TDBLogItems.Create(True);
|
|
Application.{%H-}MainFormOnTaskBar := True; // hide warning: Symbol "MainFormOnTaskBar" is not portable
|
|
|
|
// Use MySQL standard format for date/time variables: YYYY-MM-DD HH:MM:SS
|
|
// Be aware that Delphi internally converts the slashes in ShortDateFormat to the DateSeparator
|
|
DefaultFormatSettings.DateSeparator := '-';
|
|
DefaultFormatSettings.TimeSeparator := ':';
|
|
DefaultFormatSettings.ShortDateFormat := 'yyyy/mm/dd';
|
|
DefaultFormatSettings.LongTimeFormat := 'hh:nn:ss';
|
|
// Issue #2189 and #2325:
|
|
// Auto-replace French and Russian non-breaking white space, broken through the Char type
|
|
// DefaultFormatSettings.ThousandSeparator:= #160;
|
|
if DefaultFormatSettings.ThousandSeparator in [#226, #160] then
|
|
DefaultFormatSettings.ThousandSeparator := ' ';
|
|
|
|
AppSettings := TAppSettings.Create;
|
|
|
|
AppLanguage := AppSettings.ReadString(asAppLanguage);
|
|
// SysLanguage may be zh_CN, while we don't offer such a language, but anyway, this is just the current system language:
|
|
SysLanguage := GetLanguageID.LanguageCode;
|
|
LCLTranslator.SetDefaultLang(AppLanguage, '', GetApplicationName);
|
|
InitMoFile(AppLanguage);
|
|
|
|
// Enable padding in customized tooltips
|
|
//HintWindowClass := TExtHintWindow;
|
|
|
|
RequireDerivedFormResource:=True;
|
|
Application.Scaled:=True;
|
|
Application.Initialize;
|
|
//Application.UpdateFormatSettings := False;
|
|
|
|
Application.CreateForm(TMainForm, MainForm);
|
|
Application.OnException := MainForm.ApplicationException;
|
|
MainForm.AfterFormCreate;
|
|
Application.OnDeactivate := MainForm.ApplicationDeActivate;
|
|
Application.OnIdle := MainForm.ApplicationIdle;
|
|
Application.OnShortcut := MainForm.ApplicationShortCut;
|
|
Application.OnShowHint := MainForm.ApplicationShowHint;
|
|
Application.Run;
|
|
end.
|
|
|