The MToWChar method

This method converts the multibyte character from into its wide character representation.

ITWChar MToWChar(const char *from, int nfrombytes = ITLocale::ScanNoLimit) const

The nfrombytes parameter specifies the length of the corresponding multibyte character from. You can provide an integer to specify the number of bytes in from in which case this method reads up to this many bytes from from when trying to form a complete character. Or you can set nfrombytes to ITLocale::ScanNoLimit (the default), in which case this method reads as many bytes as necessary to form a complete character.

This method returns the wide character representation of multibyte character from.

If there is an error, this method returns NULL. Call ITLocale::GetError() to retrieve a specific error message.

The GLS API function ifx_gl_mbtowc() has different parameters from MToChar. The GLS API function returns the wide character in the parameter list and returns the number of bytes read in the function return value.