Internationalization and localization tools


Locale-Sensitive C/C++ String Operation Function

char *_strupr_l(char* str, _locale_t locale);

unsigned char *_mbsupr_l(unsigned char* str, _locale_t locale);

wchar_t *_wcsupr_l(wchar_t* str, _locale_t locale);

_TXCHAR *_tcsupr_l(const _TXCHAR* str, _locale_t locale);

Internationalization (I18n) Function Overview

The _strupr_l function converts any lowercase characters in str to uppercase letters, using the LC_CTYPE category setting of the passed in locale, and returns a pointer to the converted string.

_mbsupr_l and _wcsupr_l are the multibyte and wide versions of _strupr. The argument and return value of _mbsupr_l are multibyte-character strings; those of _wcsupr_l are wide-character strings.

_tcsupr_l is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _mbsupr_l or _wcsupr_l.

I18n Issues

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

Ensure that the correct locale is passed in.

Consider using the more secure versions of these functions, _strupr_s_l, _wcsupr_s_l, _tcsupr_s_l, if available.

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