[PATCH 1/2] msvcrt: Detect UTF-8 mode

Alexandre Julliard julliard at winehq.org
Mon Aug 27 12:50:58 CDT 2012


Detlef Riekenberg <wine.dev at web.de> writes:

> @@ -1286,6 +1288,17 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st
>      case '+':
>      case ' ':
>        break;
> +    case ',':
> +      if (!memcmp(mode, encoding_utf8, sizeof(encoding_utf8)) )
> +      {
> +        *open_flags |=  MSVCRT__O_U8TEXT;
> +        *open_flags &= ~(MSVCRT__O_TEXT | MSVCRT__O_BINARY | MSVCRT__O_WTEXT | MSVCRT__O_U16TEXT);
> +        mode += (sizeof(encoding_utf8)/sizeof(MSVCRT_wchar_t));
> +      }
> +      else
> +        FIXME("mode %s not supported\n", debugstr_w(mode -1));

Your string parsing needs more work.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list