Mattias Gaertner
2017-04-13 11:08:43 UTC
Hi,
Under Windows GetEnvironmentVariable(AnsiString) uses the
winapi function GetEnvironmentStringsA.
Why not simply:
Result:=String(GetEnvironmentVariable(UnicodeString(EnvVar)));
?
This would save some code and would work with another
DefaultSystemCodepage as well.
Mattias
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.fr
Under Windows GetEnvironmentVariable(AnsiString) uses the
winapi function GetEnvironmentStringsA.
Why not simply:
Result:=String(GetEnvironmentVariable(UnicodeString(EnvVar)));
?
This would save some code and would work with another
DefaultSystemCodepage as well.
Mattias
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.fr