Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Bug GH-7980 (Unexpected result for iconv_mime_decode) [ext/iconv/tests/gh7980.phpt]

未關閉
#23,875 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
68/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
c, php

研究方向

Start with ext/iconv/tests/gh7980.phpt and run the regression test using the reported encoded subject. Trace the iconv_mime_decode() path for windows-1258 input and strict UTF-8 conversion. Done means the test produces the expected decoded string without a wrong-encoding warning.

由索引模型根據 Issue 內容生成。

描述

Bug Status: Needs Triage
Description

The following code:

$subject = '=?windows-1258?Q?DSI_Charg=E9_de_Formation_Jean_Dupont?= <jdupont@example.fr>';
var_dump(iconv_mime_decode($subject, ICONV_MIME_DECODE_STRICT, 'UTF-8'));
<?php

Resulted in this output:

Warning: iconv_mime_decode(): Wrong encoding, conversion from "???" to "UTF-8" is not allowed in /opt/php/8.6/php-8.6.0beta3/ext/iconv/tests/gh7980.php on line 3
bool(false)

But I expected this output instead:

string(57) "DSI Chargé de Formation Jean Dupont <jdupont@example.fr>"
PHP Version
PHP 8.6.0beta3 (cli) (built: Sep 24 2026 01:10:42) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.6.0-dev, Copyright © Zend by Perforce
    with Zend OPcache v8.6.0beta3, Copyright ©, by Zend by Perforce
Operating System

Fedora Linux 44 (Container Image)

主要語言
C
星號
40.4k
分支
8.2k
平均合併
2 天 15 小時
30 天內合併 PR
113

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

php/php-src 的其他 Issue

查看 php/php-src 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。