[Scons-users] 回复: UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3 in position 3242: illegal multibyte sequence
liruncong2018
liruncong2018 at qq.com
Wed Apr 27 07:50:08 EDT 2022
Hi,
I compiled it in one of two ways:
1) scons -j%NUMBER_OF_PROCESSORS% --experimental=ninja
2) run_ninja_env.bat
Attached are build.ninja and run_ninja_env.bat.
------------------ 原始邮件 ------------------
发件人: "SCons users mailing list" <dmoody256 at gmail.com>;
发送时间: 2022年4月27日(星期三) 凌晨2:34
收件人: "SCons users mailing list"<scons-users at scons.org>;
主题: Re: [Scons-users] UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3 in position 3242: illegal multibyte sequence
On windows you should use the run_ninja_env.bat to ensure that your environment is setup as the ninja file itself is unable to correctly setup windows cmdshells.
On Tue, Apr 26, 2022 at 1:33 PM Daniel Moody <dmoody256 at gmail.com> wrote:
As a work around you can run ninja directly. This particular issue is scons reading and reprinting the ninja subprocess stdout. I'll see if I can reproduce and get a fix.
On Tue, Apr 26, 2022 at 1:11 PM Mats Wichmann <mats at wichmann.us> wrote:
On 4/26/22 06:10, liruncong2018 via Scons-users wrote:
> Hi,
>
> The following log appears when compiling with ninja, is there a
> problem with the encoding process?(ninja\__init__.py)
>
> ···
>
> [1/2518] Starting scons daemon... [2K
>
> [2/2518] Defer to SCons to build build\__cpp_path.txt [2K
>
> [3/2518] Defer to SCons to build
> build\__exe_cpp_path.txt [2K
>
> [4/2518] Defer to SCons to build
> build\__link_objects.txt [2K
>
> [5/2518] Defer to SCons to build
> build\__define_options.txt [2Kscons: *** [build.ninja]
> UnicodeDecodeError : 'gbk' codec can't decode byte 0xa3
> in position 3299: illegal multibyte sequence
>
> Traceback (most recent call last):
>
> File
> "D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Action.py", line
> 1295, in execute
>
> result = self.execfunction(target=target,
> source=rsources, env=env)
>
> File
> "D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Tool\ninja\__init__.py",
> line 112, in ninja_builder
>
> for output in execute_ninja():
>
> File
> "D:\MYBIN\scons-local\scons-local-4.3.1\SCons\Tool\ninja\__init__.py",
> line 104, in execute_ninja
>
> for stdout_line in iter(proc.stdout.readline, ""):
>
> UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3
> in position 3299: illegal multibyte sequence
>
that error usually happens when the system codec isn't what we US-based
folk expect, and we haven't specified an encoding for a file/stream when
reading in text mode so the system codec gets used.
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220427/269f44cf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ninja.rar
Type: application/octet-stream
Size: 100482 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220427/269f44cf/attachment-0001.obj>
More information about the Scons-users
mailing list