mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Cache encoding list
This commit is contained in:
parent
7d329ad93f
commit
497eb06fd8
1 changed files with 9 additions and 5 deletions
|
|
@ -358,11 +358,15 @@ procedure GetSupportedEncodings(List: TStrings);
|
|||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
TStringList(List).CaseSensitive:= False;
|
||||
LConvEncoding.GetSupportedEncodings(List);
|
||||
Index:= List.IndexOf(EncodingAnsi);
|
||||
List[Index] := UpperCase(EncodingAnsi);
|
||||
List.Insert(Index + 1, UpperCase(EncodingOem));
|
||||
if SupportedEncodings.Count > 0 then
|
||||
List.Assign(SupportedEncodings)
|
||||
else begin
|
||||
TStringList(List).CaseSensitive:= False;
|
||||
LConvEncoding.GetSupportedEncodings(List);
|
||||
Index:= List.IndexOf(EncodingAnsi);
|
||||
List[Index] := UpperCase(EncodingAnsi);
|
||||
List.Insert(Index + 1, UpperCase(EncodingOem));
|
||||
end;
|
||||
end;
|
||||
|
||||
function DetectEncoding(const S: String): String;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue