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

quoted_printable_encode does not encode trailing space

オープン 初心者向け
#24,458 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c, php
領域
backend

調査の方向性

まず、PHPのソースツリーで quoted_printable_encode の実装と既存のテストを探します。issue には具体的なファイル名が示されていません。末尾に空白がある例を再現し、引用されている RFC 2045 の規則で要求されるとおり、エンコード結果が =20 で終わることを確認します。

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

説明

Bug Status: Needs Triage
Description

The following code:

<?php
var_dump(quoted_printable_encode('hello '));

Resulted in this output:

string(6) "hello "

But I expected this output instead:

string(9) "hello=20"

RFC 2045 says:

(3)   (White Space) Octets with values of 9 and 32 MAY be
      represented as US-ASCII TAB (HT) and SPACE characters,
      respectively, but MUST NOT be so represented at the end
      of an encoded line.  Any TAB (HT) or SPACE characters
      on an encoded line MUST thus be followed on that line
      by a printable character.  In particular, an "=" at the
      end of an encoded line, indicating a soft line break
      (see rule #5) may follow one or more TAB (HT) or SPACE
      characters.  It follows that an octet with decimal
      value 9 or 32 appearing at the end of an encoded line
      must be represented according to Rule #1.  This rule is
      necessary because some MTAs (Message Transport Agents,
      programs which transport messages from one user to
      another, or perform a portion of such transfers) are
      known to pad lines of text with SPACEs, and others are
      known to remove "white space" characters from the end
      of a line.  Therefore, when decoding a Quoted-Printable
      body, any trailing white space on a line must be
      deleted, as it will necessarily have been added by
      intermediate transport agents.
PHP Version
PHP 8.7.0-dev (cli) (built: Oct 18 2026 16:29:33) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.7.0-dev, Copyright © Zend by Perforce
    with Zend OPcache v8.7.0-dev, Copyright ©, by Zend by Perforce
Operating System

No response

主要言語
C
スター
40.4k
フォーク
8.2k
平均マージ
2日 22時間
マージ済み PR(30日)
166

環境構築

はじめの一歩

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

php/php-src のほかの issue

php/php-src の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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