LCL: GetSystemEncoding: not using LANG under windows

git-svn-id: trunk@16267 -
This commit is contained in:
mattias 2008-08-27 08:46:09 +00:00
parent 46a2af42a2
commit 8c0aae4a24

View File

@ -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);