Code to get all environment variables

Thomas Kuehne thomas-dloop at kuehne.cn
Tue Jun 13 12:55:21 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Deewiant schrieb am 2006-06-12:

<snip>

> The Windows code uses the ASCII, not UTF-16, versions of the functions, since
> I'm not comfortable messing around with different encodings

I'm not a MSWindows native..

Are you sure that GetEnvironmentStringsA and FreeEnvironmentStringsA use ASCII?
I'd expect them to use locale and/or installation dependent ANSI encoding.

> whether it would be smarter to make the Posix version convert ASCII to wchars or
> the Windows code to convert UTF-16 to chars.

Unless there any strong reasons - like buggy implementations in some MSWindows
versions - I'd opt for the UTF-16 to UTF-8 conversion.

Thoms


-----BEGIN PGP SIGNATURE-----

iD8DBQFEjxeO3w+/yD4P9tIRAt/5AKCmlJvXPMsU/rc7NB+Q+VfAQKKjvwCggj/5
s0uuztlyz5hbDTFNeCqhzpQ=
=qtgN
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-announce mailing list