The SizeForCodesetConversion method
This method calculates the number of bytes needed to convert the multibyte characters in nfrombytes from the code set associated with the fromLocaleName locale to the code set associated with the toLocaleName locale.
int SizeForCodesetConversion(const char *toLocaleName,
const char *fromLocaleName,
int nfrombytes) const
This method returns the number of bytes to convert. If this value equals the number of bytes in nfrombytes, then conversion is done in place. Otherwise, you must allocate another buffer for the conversion.
If
there is an error, this method returns -1
. Call ITLocale::GetError() to
retrieve a specific error message.