Re: [fpc-devel] SysUtils.GetEnvironmentVariable(String) still uses GetEnvironmentVariableA

2016-05-23 Thread Denis Kozlov
On 23 May 2016 at 15:23, Jonas Maebe wrote: > > Michael Van Canneyt wrote on Mon, 23 May 2016: > > The typecase will not help you, since the result is an ansistring. >> The result will still be crippled. >> > > It would help when DefaultSystemCodePage is changed to UTF-8, as Lazarus > does. > > T

Re: [fpc-devel] SysUtils.GetEnvironmentVariable(String) still uses GetEnvironmentVariableA

2016-05-23 Thread Jonas Maebe
Michael Van Canneyt wrote on Mon, 23 May 2016: On Mon, 23 May 2016, Jonas Maebe wrote: Michael Van Canneyt wrote on Mon, 23 May 2016: The typecase will not help you, since the result is an ansistring. The result will still be crippled. It would help when DefaultSystemCodePage is changed t

Re: [fpc-devel] SysUtils.GetEnvironmentVariable(String) still uses GetEnvironmentVariableA

2016-05-23 Thread Michael Van Canneyt
On Mon, 23 May 2016, Jonas Maebe wrote: Michael Van Canneyt wrote on Mon, 23 May 2016: The typecase will not help you, since the result is an ansistring. The result will still be crippled. It would help when DefaultSystemCodePage is changed to UTF-8, as Lazarus does. Should that not be

Re: [fpc-devel] SysUtils.GetEnvironmentVariable(String) still uses GetEnvironmentVariableA

2016-05-23 Thread Jonas Maebe
Michael Van Canneyt wrote on Mon, 23 May 2016: The typecase will not help you, since the result is an ansistring. The result will still be crippled. It would help when DefaultSystemCodePage is changed to UTF-8, as Lazarus does. The only solution for this is a unicode RTL. That is incorrec

Re: [fpc-devel] SysUtils.GetEnvironmentVariable(String) still uses GetEnvironmentVariableA

2016-05-23 Thread Michael Van Canneyt
The typecase will not help you, since the result is an ansistring. The result will still be crippled. The only solution for this is a unicode RTL. Michael. On Mon, 23 May 2016, Denis Kozlov wrote: P.S. A minor typo, GetEnvironmentVariableA should read GetEnvironmentStringsA. On 23 May 201

Re: [fpc-devel] SysUtils.GetEnvironmentVariable(String) still uses GetEnvironmentVariableA

2016-05-23 Thread Denis Kozlov
P.S. A minor typo, GetEnvironmentVariableA should read GetEnvironmentStringsA. On 23 May 2016 at 13:31, Denis Kozlov wrote: > Hi, > > In FPC 3.0.0 and TRUNK for Windows: > > SysUtils.GetEnvironmentVariable(String) uses GetEnvironmentVariableA > > SysUtils.GetEnvironmentVariable(UnicodeString) u

[fpc-devel] SysUtils.GetEnvironmentVariable(String) still uses GetEnvironmentVariableA

2016-05-23 Thread Denis Kozlov
Hi, In FPC 3.0.0 and TRUNK for Windows: > SysUtils.GetEnvironmentVariable(String) uses GetEnvironmentVariableA > SysUtils.GetEnvironmentVariable(UnicodeString) uses GetEnvironmentStringsW GetEnvironmentVariableA produces a result crippled by ANSI/OEM. Can it be replaced with a simple typecast of