Jacek Caban (@jacek) commented about dlls/vbscript/global.c:
+ LCID old_lcid = This->ctx->lcid; + LCID new_lcid; + HRESULT hres; + + TRACE("%s\n", args_cnt ? debugstr_variant(args) : "()"); + + if(!args_cnt) { + This->ctx->lcid = GetUserDefaultLCID(); + return return_int(res, old_lcid); + } + + switch(V_VT(args)) { + case VT_NULL: + return MAKE_VBSERROR(VBSE_ILLEGAL_NULL_USE); + case VT_EMPTY: + This->ctx->lcid = GetUserDefaultLCID(); I think we should set it to the embedder-specified value here, rather than the user default. What you are observing is likely an effect of `ActiveScriptSite_GetLCID` in run.c being implemented using `GetUserDefaultLCID`. If I change that, the test fails.
We should probably store it separately from the "current" LCID, so that it is possible to revert after `SetLocale` changes the current locale. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10504#note_137463