mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 11:19:40 +02:00
LCL: GetSystemEncoding: not using LANG under windows
git-svn-id: trunk@16267 -
This commit is contained in:
parent
46a2af42a2
commit
8c0aae4a24
@ -109,8 +109,11 @@ end;
|
||||
{$ENDIF}
|
||||
|
||||
function GetSystemEncoding: string;
|
||||
var Lang: string;
|
||||
i: integer;
|
||||
{$IFNDEF Windows}
|
||||
var
|
||||
Lang: string;
|
||||
i: integer;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if EncodingValid then begin
|
||||
Result:=SystemEncoding;
|
||||
@ -121,7 +124,6 @@ begin
|
||||
Result:=GetWindowsEncoding;
|
||||
{$ELSE}
|
||||
Result:=EncodingAnsi;
|
||||
{$ENDIF}
|
||||
|
||||
lang := GetEnv('LC_ALL');
|
||||
if Length(lang) = 0 then
|
||||
@ -135,6 +137,7 @@ begin
|
||||
i:=pos('.',Lang);
|
||||
if (i>0) and (i<=length(Lang)) then
|
||||
Result:=copy(Lang,i+1,length(Lang)-i);
|
||||
{$ENDIF}
|
||||
|
||||
Result:=NormalizeEncoding(Result);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user