Index: wine-unstable-1.5.13/dlls/msvcrt/file.c =================================================================== --- wine-unstable-1.5.13.orig/dlls/msvcrt/file.c 2012-09-28 23:13:18.740186708 +0400 +++ wine-unstable-1.5.13/dlls/msvcrt/file.c 2012-09-28 23:34:31.356769871 +0400 @@ -1245,6 +1245,7 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* stream_flags) { int plus = strchrW(mode, '+') != NULL; + const MSVCRT_wchar_t* comma = NULL; switch(*mode++) { @@ -1286,6 +1287,23 @@ case '+': case ' ': break; + /* ",ccs=" string. */ + case ',': + /* correctly parsing CSV here, though it's probably not needed */ + FIXME("mode string %s is not fully supported\n", wine_dbgstr_w(mode)); + + /* FIXME: tell open_flags or w/e else that we have ccs set */ + /* just compare name=val as strings for now */ + if (strcmpW(mode, L"ccs=UNICODE") == 0) + *open_flags |= MSVCRT__O_WTEXT; + else if (strcmpW(mode, L"ccs=UTF-8") == 0) + *open_flags |= MSVCRT__O_UTF8; + else if (strcmpW(mode, L"ccs=UTF-16LE") == 0) + *open_flags |= MSVCRT__O_UTF16; + + comma = strchrW(mode, ','); + mode = (comma != NULL) ? comma : (mode + strlenW(mode)); + break; default: FIXME(":unknown flag %c not supported\n",mode[-1]); }