Lines 661-667
wind_MultiByteToWideChar (rc_uint_type c
Link Here
|
661 |
rc_uint_type ret = 0; |
661 |
rc_uint_type ret = 0; |
662 |
|
662 |
|
663 |
#if defined (_WIN32) || defined (__CYGWIN__) |
663 |
#if defined (_WIN32) || defined (__CYGWIN__) |
664 |
ret = (rc_uint_type) MultiByteToWideChar (cp, MB_PRECOMPOSED, |
664 |
rc_uint_type conv_flags = MB_PRECOMPOSED; |
|
|
665 |
|
666 |
/* MB_PRECOMPOSED is not allowed for UTF-7 or UTF-8. |
667 |
MultiByteToWideChar will set the last error to ERROR_INVALID_FLAGS |
668 |
if we do anyways. */ |
669 |
if (cp == CP_UTF8 || cp == CP_UTF7) |
670 |
conv_flags = 0; |
671 |
|
672 |
ret = (rc_uint_type) MultiByteToWideChar (cp, conv_flags, |
665 |
mb, -1, u, u_len); |
673 |
mb, -1, u, u_len); |
666 |
/* Convert to bytes. */ |
674 |
/* Convert to bytes. */ |
667 |
ret *= sizeof (unichar); |
675 |
ret *= sizeof (unichar); |