Internationalization and localization tools


Multibyte to Wide Character Conversion Function

size_t mbrlen(const char *s, size_t n, mbstate_t *ps);

Internationalization (I18n) Function Overview

The mbrlen function returns the number of bytes necessary for converting a multibyte character into its corresponding wide character code, or an error code if the conversion cannot succeed. The function will not look at more than count bytes in s, and keeps track of the conversion state in ps.

This is equivalent to calling mbrtowc(0,s,n,ps!=0?ps:&internal).

I18n Issues

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

Recommended Replacements*

There are no variations of this conversion 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