Skip to content

gh-87888: Make FileCookieJar use ASCII/surrogateescape#92392

Closed
methane wants to merge 5 commits into
python:mainfrom
methane:cookiejar-latin1
Closed

gh-87888: Make FileCookieJar use ASCII/surrogateescape#92392
methane wants to merge 5 commits into
python:mainfrom
methane:cookiejar-latin1

Conversation

@methane

@methane methane commented May 6, 2022

Copy link
Copy Markdown
Member
  • Byte transparent reading and writing.
  • Consistent with WSGI.
  • Avoid UnicodeDecodeError when reading comments.

gh-87888

…ding

* Byte transparent reading and writing.
* Consistent with WSGI.
* Avoid UnicodeDecodeError when reading comments.
@methane methane changed the title Make FileCookieJar use latin-1 instead of locale encoding gh-87888: Make FileCookieJar use latin-1 instead of locale encoding May 6, 2022

@iritkatriel iritkatriel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a merge conflict now. Is this still needed?

@bedevere-bot

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

And if you don't make the requested changes, you will be poked with soft cushions!

@methane methane changed the title gh-87888: Make FileCookieJar use latin-1 instead of locale encoding gh-87888: Make FileCookieJar use ASCII/surrogateescape Oct 23, 2024
@methane

methane commented Oct 23, 2024

Copy link
Copy Markdown
Member Author

I changed to use ASCII/surrogateescape instead of latin-1.
ref: https://discuss.python.org/t/using-utf-8-for-cookie-txt/15562/12

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 11, 2026
@methane

methane commented Apr 11, 2026

Copy link
Copy Markdown
Member Author

I think it would be correct to use ASCII by default. However, for backward compatibility, it might be a better choice to leave the code as is and let PEP 686 use UTF-8 by default. Users who need to open older cookijar files can turn off UTF-8 Mode.

@methane methane closed this Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants