<div dir="ltr">P.S. A minor typo, GetEnvironmentVariableA should read GetEnvironmentStringsA.<br><br><div class="gmail_extra"><br><div class="gmail_quote">On 23 May 2016 at 13:31, Denis Kozlov <span dir="ltr"><<a href="mailto:dezlov@gmail.com" target="_blank">dezlov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br></div><div>In FPC 3.0.0 and TRUNK for Windows:<br></div><div>> SysUtils.GetEnvironmentVariable(String) uses GetEnvironmentVariableA<br>> SysUtils.GetEnvironmentVariable(UnicodeString) uses GetEnvironmentStringsW<br><br>GetEnvironmentVariableA produces a result crippled by ANSI/OEM. Can it be replaced with a simple typecast of UnicodeString based function:<br><br>function GetEnvironmentVariable(const EnvVar: String): String; <br></div><div>begin<br></div><div> Result := String(GetEnvironmentVariable(UnicodeString(EnvVar)));<br></div><div>end;<br><br></div><div>Denis<br></div></div>
</blockquote></div><br></div></div>