| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
`Out-File -Encoding utf8` in Windows Powershell 5.1 emits UTF-8 with a BOM maker, which the regular `utf-8` codec decodes incorrectly. `utf-8-sig` accepts a BOM, but also works correctly without one.
|
I flagged this as skipping news, as it seems like part of the not-yet-released gh-77102 changes to me. |
Sorry, something went wrong.
|
PowerShell 5.1 is very old and will be EOL in 2025. I am not sure about adding some support for it is worth enough. |
Sorry, something went wrong.
|
+1 from me. Any time we know we're decoding the start of a file, there's no harm in using utf-8-sig. I wouldn't use it anywhere we write to a file. It's a bit unfortunate we don't have an encoding that will silently drop a BOM at the start of a buffer without also adding one going the other direction. (Or an encoding that will detect a BOM and switch to UTF-8, or else use 'locale', which is the typical way Windows apps handle this.) |
Sorry, something went wrong.
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
Thanks @ncoghlan for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, something went wrong.
`Out-File -Encoding utf8` and similar commands in Windows Powershell 5.1 emit UTF-8 with a BOM marker, which the regular `utf-8` codec decodes incorrectly. `utf-8-sig` accepts a BOM, but also works correctly without one. This change also makes .pth files match the way Python source files are handled. (cherry picked from commit bf5b646) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
`Out-File -Encoding utf8` and similar commands in Windows Powershell 5.1 emit UTF-8 with a BOM marker, which the regular `utf-8` codec decodes incorrectly. `utf-8-sig` accepts a BOM, but also works correctly without one. This change also makes .pth files match the way Python source files are handled. (cherry picked from commit bf5b646) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
GH-119508 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
GH-119509 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot ARM64 MacOS M1 Refleaks NoGIL 3.x has failed when building commit bf5b646. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1368/builds/1058 Failed tests:
Test leaking resources:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 7, done.
remote: Counting objects: 14% (1/7)
remote: Counting objects: 28% (2/7)
remote: Counting objects: 42% (3/7)
remote: Counting objects: 57% (4/7)
remote: Counting objects: 71% (5/7)
remote: Counting objects: 85% (6/7)
remote: Counting objects: 100% (7/7)
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 25% (1/4)
remote: Compressing objects: 50% (2/4)
remote: Compressing objects: 75% (3/4)
remote: Compressing objects: 100% (4/4)
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 3), reused 1 (delta 0), pack-reused 0
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to 'bf5b6467f8cc06759f3396ab1a8ad64fe7d1db2e'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at bf5b6467f8 GH-119496: accept UTF-8 BOM in .pth files (GH-119503)
Switched to and reset branch 'main'
In file included from ./Modules/tkappinit.c:17:
In file included from /opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/tk.h:99:
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:131:21: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int (*free_private)(); /* called to free private storage */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:334:33In file included from ./Modules/_tkinter.c:52:
In file included from /opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/tk.h:99:
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:131:21: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int (*free_private)(); /* called to free private storage */
^
void
: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
struct _XImage *(*create_image)();
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:453:23: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
XID (*resource_alloc)(); /* allocator function */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:471:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:334: int (*synchandler)(); /* Synchronization handler */33
: ^
warning: voida function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
struct _XImage *(*create_image)();
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:496:24: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
Bool (*event_vec[128])(); /* vector for wire to event */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:497:25: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
Status (*wire_vec[128])(); /* vector for event to wire */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:509:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
Bool (**error_vec)(); /* vector for wire to error */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:453:23: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
XID (*resource_alloc)(); /* allocator function */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:522:25: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:471:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int (*synchandler)(); /* Synchronization handler */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:496:24: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
Bool (*event_vec[128])(); /* vector for wire to event */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:497:25: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
Status (*wire_vec[128])(); /* vector for event to wire */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:509:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
Bool (**error_vec)(); /* vector for wire to error */
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:522:25: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
^
void/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:1053:24:
warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
typedef void (*XIMProc)();
^
void
/opt/homebrew/Cellar/tcl-tk/8.6.13_5/include/tcl-tk/X11/Xlib.h:1053:24: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
typedef void (*XIMProc)();
^
void
9 warnings generated.
9 warnings generated.
make: *** [buildbottest] Error 2 |
Sorry, something went wrong.
`Out-File -Encoding utf8` and similar commands in Windows Powershell 5.1 emit UTF-8 with a BOM marker, which the regular `utf-8` codec decodes incorrectly. `utf-8-sig` accepts a BOM, but also works correctly without one. This change also makes .pth files match the way Python source files are handled. Co-authored-by: Inada Naoki <songofacandy@gmail.com>
| Back | FazBrowse Home | New Git URL |
Out-File -Encoding utf8 in Windows Powershell 5.1 emits
UTF-8 with a BOM marker, which the regular utf-8 codec
decodes incorrectly. utf-8-sig accepts a BOM, but also
works correctly without one.