Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Uppercase "UTF-8" encoding name no longer works in CircuitPython 11

クローズ
#11,580 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, python
領域
embedded-iot

調査の方向性

The payload names no source files. Start from the encoding check that micropython/micropython#18854 and #19474 introduced, which accepts only utf-8, utf8 and ascii exactly, and reproduce with bytes("hi", "UTF-8") on a CircuitPython 11 build. The open question is whether the core should match names case-insensitively or the libraries should change, so settle that with the maintainers before writing a patch. Done means the chosen behaviour is agreed and "UTF-8" either encodes correctly or is documented as unsupported.

索引モデルが issue の本文から書いたものです。

説明

bug cpython api

Passing "UTF-8" as an encoding raises LookupError on CircuitPython 11.

It worked on 10.x and works in CPython.

>>> bytes("hi", "utf-8")
b'hi'
>>> bytes("hi", "UTF-8")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
LookupError: unknown encoding: UTF-8
>>> "hi".encode("UTF-8")
LookupError: unknown encoding: UTF-8
Board Version "UTF-8"
Feather RP2040 RFM 11.0.0-alpha.1 LookupError
Fruit Jam 11.0.0-alpha.1-71-g36a5653882 LookupError
Metro RP2350 11.0.0-alpha.0-22-g4453bba9a1 LookupError
(10.3.x source) no encoding check

The check came from micropython/micropython#18854 and micropython/micropython#19474, which accept only utf-8, utf8 and ascii exactly.

It breaks 9 of the 14 examples in adafruit/Adafruit_CircuitPython_RFM#26, and code search finds about 340 adafruit Python files using "UTF-8").

Should CircuitPython match encoding names case-insensitively, or should we fix the libraries?

Found with help from Claude Code. The REPL output is from the boards above.

主要言語
C
スター
4.6k
フォーク
1.4k
平均マージ
23時間 40分
マージ済み PR(30日)
167

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

adafruit/circuitpython のほかの issue

adafruit/circuitpython の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。