mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: DetectEncoding - return a normalized encoding name
(cherry picked from commit c072da45b5)
This commit is contained in:
parent
51b94c0954
commit
2b5adfb10e
1 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Push some useful functions to Lua
|
||||
|
||||
Copyright (C) 2016-2023 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2016-2025 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
|
@ -36,7 +36,7 @@ function ExecuteScript(const FileName: String; Args: array of String; var sError
|
|||
implementation
|
||||
|
||||
uses
|
||||
Forms, Dialogs, Clipbrd, LazUTF8, LCLVersion, uLng, DCOSUtils,
|
||||
Forms, Dialogs, Clipbrd, LazUTF8, LConvEncoding, uLng, DCOSUtils,
|
||||
DCConvertEncoding, fMain, uFormCommands, uOSUtils, uGlobs, uLog,
|
||||
uClipboard, uShowMsg, uLuaStd, uFindEx, uConvEncoding, uFileProcs,
|
||||
uFilePanelSelect, uMasks, LazFileUtils, Character, UnicodeData;
|
||||
|
|
@ -373,7 +373,7 @@ var
|
|||
begin
|
||||
Result:= 1;
|
||||
S:= lua_tostring(L, 1);
|
||||
lua_pushstring(L, DetectEncoding(S));
|
||||
lua_pushstring(L, NormalizeEncoding(DetectEncoding(S)));
|
||||
end;
|
||||
|
||||
function char_prepare(L : Plua_State; out Index: Integer): UnicodeString;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue