GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Explicitly specify the encoding parameter value of `calendar.HTMLCalendar` as 'utf-8' · Issue #135001 · python/cpython

Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8'  #135001

New issue
Copy link
New issue
Copy link
Closed
Closed
Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8' #135001
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@Wulian233
Wulian233
opened on Jun 1, 2025
Issue body actions

Feature or enhancement

Proposal:

Currently, the calendar.HTMLCalendar.formatyearpage method is used to generate an html of a calendar. encoding parameter defaults to the sys.getdefaultencoding(), but it always returns "utf-8". (PEP 686 – Making UTF-8 Mode default ) I propose changing this default to 'utf-8', this makes it clearer

In a similar vein, the difflib.HtmlDiff also outputs HTML with UTF-8 encoding by default.

Linked PRs

  • gh-135001: Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8' #135002

Activity

  1. Wulian233
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jun 1, 2025
  2. Wulian233
    changed the title [-]Change the default *encoding* of `calendar.HTMLCalendar` to UTF-8[/-] [+]Change the default encoding parameter value of `calendar.HTMLCalendar` to utf-8[/+] on Jun 1, 2025
  3. picnixz
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Jun 1, 2025
  4. Wulian233
    changed the title [-]Change the default encoding parameter value of `calendar.HTMLCalendar` to utf-8[/-] [+]Explicitly specify the encoding parameter value of `calendar.HTMLCalendar` as 'utf-8' [/+] on Jun 6, 2025
  5. vstinner
    added a commit that references this issue on Jun 9, 2025

    gh-135001: Explicitly specify the encoding parameter value of `calend…

    f90483e
  6. vstinner
    closed this as completedon Jun 9, 2025
  7. lkollar
    added a commit that references this issue on Jun 19, 2025

    pythongh-135001: Explicitly specify the encoding parameter value of `…

    1b2c7a3
  8. Pranjal095
    added a commit that references this issue on Jul 12, 2025

    pythongh-135001: Explicitly specify the encoding parameter value of `…

    40e6367
  9. taegyunkim
    added a commit that references this issue on Aug 4, 2025

    pythongh-135001: Explicitly specify the encoding parameter value of `…

    246473b
  10. Agent-Hellboy
    added a commit that references this issue on Aug 19, 2025

    pythongh-135001: Explicitly specify the encoding parameter value of `…

    f5f6eef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.