Open ShimYama opened 2 months ago
It is reporting that the output of cl /?
is garbled!
Question is, what could or should we do about making cl.exe produce output which is more useful for our logging. Given configuration succeeds I wonder whether we actually need to do anything here though. The log file does accurately describe the information it used to detect the compiler...
Not that I've looked at in any detail, but just from the log file, this has mixed-up character encoding all over it. My hunch is that the Windows terminal has some fun multi-byte code page that's not UTF-8 or UTF-16, and it's not correctly transcoded to whatever Python and meson is using (please let that be UTF-8, or at least UTF-something :pray:).
@ShimYama Would it be correct to assume that both your Windows and Visual Studio is in Japanese? If so, do you happen to know whether Shift JIS, ISO-2022-JP or EUC-JP is being used by default in the Windows terminal or Visual Studio?
This isn't me saying I'll go fix it (...but I might have a quick peek at it later), but I assume this will be immensely helpful for whoever tries to look at it.
@eli-schwartz I haven't looked a single line of code here, but could it be that there's no code checking the character encoding of the terminal? If so, then this might honestly not be that difficult to fix.
@ShimYama Would it be correct to assume that both your Windows and Visual Studio is in Japanese? If so, do you happen to know whether Shift JIS, ISO-2022-JP or EUC-JP is being used by default in the Windows terminal or Visual Studio?
I checked my command prompt and Visual Studio Developer Command Prompt and it uses Shift-JIS by default.
> chcp
現在のコード ページ: 932
I switched encoding to UTF-8 by running this command.
> chcp 65001
Active code page: 65001
Then run meson again, I got correct log text file. meson-log.txt
ref. https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
Describe the bug Characters in meson_log.txt are garbled.
To Reproduce
hello.c
meson.build
meson build --backend vs
helloworld undefined
User defined options backend: vs
WARNING: Running the setup command as
meson [options]
instead ofmeson setup [options]
is ambiguous and deprecated.