mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Fix wrong spelled character sets in HTML files, exported from grids. Fixes issue #2825
This commit is contained in:
@@ -419,7 +419,7 @@ begin
|
||||
' <head>' + CRLF +
|
||||
' <title>' + TableName + '</title>' + CRLF +
|
||||
' <meta name="GENERATOR" content="'+ APPNAME+' '+Mainform.AppVersion + '">' + CRLF +
|
||||
' <meta http-equiv="Content-Type" content="text/html; charset='+Mainform.GetCharsetByEncoding(Encoding)+'" />' + CRLF +
|
||||
' <meta http-equiv="Content-Type" content="text/html; charset='+GetHTMLCharsetByEncoding(Encoding)+'" />' + CRLF +
|
||||
' <style type="text/css">' + CRLF +
|
||||
' thead tr {background-color: ActiveCaption; color: CaptionText;}' + CRLF +
|
||||
' th, td {vertical-align: top; font-family: "'+Grid.Font.Name+'"; font-size: '+IntToStr(Grid.Font.Size)+'pt; padding: '+IntToStr(Grid.TextMargin-1)+'px; }' + CRLF +
|
||||
|
||||
@@ -221,6 +221,7 @@ type
|
||||
function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer; overload;
|
||||
function ErrorDialog(Msg: string): Integer; overload;
|
||||
function ErrorDialog(const Title, Msg: string): Integer; overload;
|
||||
function GetHTMLCharsetByEncoding(Encoding: TEncoding): String;
|
||||
|
||||
var
|
||||
MainReg: TRegistry;
|
||||
@@ -2569,6 +2570,24 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function GetHTMLCharsetByEncoding(Encoding: TEncoding): String;
|
||||
begin
|
||||
Result := '';
|
||||
if Encoding = TEncoding.Default then
|
||||
Result := 'Windows-'+IntToStr(GetACP)
|
||||
else if Encoding = TEncoding.ASCII then
|
||||
Result := 'ascii'
|
||||
else if Encoding = TEncoding.Unicode then
|
||||
Result := 'utf-16le'
|
||||
else if Encoding = TEncoding.BigEndianUnicode then
|
||||
Result := 'utf-16'
|
||||
else if Encoding = TEncoding.UTF8 then
|
||||
Result := 'utf-8'
|
||||
else if Encoding = TEncoding.UTF7 then
|
||||
Result := 'utf-7';
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Threading stuff }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user