Internationalization and localization tools


Locale-Sensitive C/C++ String Operation Function

int putenv(char* envname);

int _putenv(const char* envname);

int _wputenv(const wchar_t* envname);

int _tputenv(const _TCHAR* envname);

Internationalization (I18n) Function Overview

The _putenv function creates, modifies, or removes an environment variable, returning 0 if successful and -1 otherwise.

Supported on Windows platforms only, _wputenv is the wide character version of _putenv, passing in a wide-character envname string.

_tputenv is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _putenv or _wputenv.

_getws is the wide-character version of the function; its parameters and return value are wide characters. _getws is supported on Windows platforms only. There is no wide version on ANSI platforms.

I18n Issues

Use the appropriate version of the function as required for internationalization support, noting the following:

There is no ANSI wide character version of putenv. Instead, use a conversion routine to convert the wide character envname string to a multibyte string and call putenv.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

Locale-Sensitive C/C++ String Operation Functions

 

Lingoport internationalization and localization services and software