We recommend using Visual Studio 2017

_mbctolower, _mbctolower_l, _mbctoupper, _mbctoupper_l


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at _mbctolower, _mbctolower_l, _mbctoupper, _mbctoupper_l.

Tests and converts the case of a multibyte character.

System_CAPS_ICON_important.jpg Important

This API cannot be used in applications that execute in the Windows Runtime. For more information, see CRT functions not supported with /ZW.

unsigned int _mbctolower(  
   unsigned int c   
unsigned int _mbctolower_l(  
   unsigned int c,  
   _locale_t locale  
unsigned int _mbctoupper(  
   unsigned int c   
unsigned int _mbctoupper_l(  
   unsigned int c,  
   _locale_t locale  


Multibyte character to convert.

Locale to use.

Each of these functions returns the converted character c, if possible. Otherwise it returns the character c unchanged.

The functions test a character c and, if possible, apply one of the following conversions.

_mbctolower,_mbctolower_lUppercase character to lowercase character.
_mbctoupper,_mbctoupper_lLowercase character to uppercase character.

The output value is affected by the setting of the LC_CTYPE category setting of the locale; see setlocale for more information. The version of this function without the _l suffix uses the current locale for this locale-dependent behavior; the version with the _l suffix is identical except that it uses the locale parameter passed in instead. For more information, see Locale.

In previous versions, _mbctolower was calledjtolower, and _mbctoupper was called jtoupper. For new code, use the new names instead.

Generic-Text Routine Mappings

Tchar.h routine_UNICODE and _MBCS not defined_MBCS defined_UNICODE defined
RoutinesRequired header

For more compatibility information, see Compatibility.

Data Conversion
_mbbtombc, _mbbtombc_l
_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l
_mbctohira, _mbctohira_l, _mbctokata, _mbctokata_l
_mbctombb, _mbctombb_l