File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
8282 windows-2022. The packaging tar bz2 and xz tests should be run on
8383 Windows 11 and GitHub windows-2025.
8484
85+ From William Deegan:
86+ - Fix Issue #4746. TEMPFILE's are written with utf-8 encoding, this doesn't work
87+ for all situations. Change to use locale.getpreferredencoding(False), which should
88+ yield the encoding for the system.
89+
8590 From Edward Peek:
8691 - Fix the variant dir component being missing from generated source file
8792 paths with CompilationDatabase() builder (Fixes #4003).
Original file line number Diff line number Diff line change 7676- Fix a test problem on Windows where UNC tests failed due to incorrect path
7777 munging if a non-default %TEMP% was defined (as in moving to a Dev Drive).
7878
79+ - Fix Issue #4746. TEMPFILE's are written with utf-8 encoding, this doesn't work
80+ for all situations. Change to use locale.getpreferredencoding(False), which should
81+ yield the encoding for the system.
82+
7983IMPROVEMENTS
8084------------
8185
Original file line number Diff line number Diff line change 4747import os
4848import sys
4949import tempfile
50+ import locale
5051
5152import SCons .Errors
5253import SCons .Subst
@@ -279,7 +280,7 @@ def tmpfile_cleanup(file) -> None:
279280 tempfile_esc_func = env .get ('TEMPFILEARGESCFUNC' , SCons .Subst .quote_spaces )
280281 args = [tempfile_esc_func (arg ) for arg in cmd [1 :]]
281282 join_char = env .get ('TEMPFILEARGJOIN' , ' ' )
282- os .write (fd , bytearray (join_char .join (args ) + "\n " , encoding = "utf-8" ))
283+ os .write (fd , bytearray (join_char .join (args ) + "\n " , encoding = locale . getpreferredencoding ( False ) ))
283284 os .close (fd )
284285
285286 # XXX Using the SCons.Action.print_actions value directly
You can’t perform that action at this time.
0 commit comments