Internationalization and localization tools


Multibyte Conversion Function

int mblen(const char *mbstr, size_t count);

Internationalization (I18n) Function Overview

The mblen function test the validity of the multibyte character pointed to by mbstr, using the LC_CTYPE category setting of the current locale, and returns the number of bytes that make up the character; else -1 in the case of an error. The function will not look at more than count bytes in mbstr.

mblen is often used to convert between multibyte and wide-character representations.

I18n Issues

Prior to calling mblen, ensure that the current locale is set correctly.

Recommended Replacements*

There are no variations of this multibyte function.

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

Multibyte and Wide Character Conversion Functions

 

Lingoport internationalization and localization services and software