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-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel