Skip to content

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

Closed

Description

@ArchMaster2024

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)

Activity

  1. Truta446 commented on Oct 27, 2026

    @Truta446

    On Fedora 44 the windows-1258 converter (CP1258.so) is in glibc-gconv-extra, which minimal images don't install, so iconv_open() fails. I opened #24789 to skip the test when the charset is unavailable. (The CP850 case in GH-23874 is covered by #24406.)

  2. ArchMaster2024 commented on Oct 27, 2026

    @ArchMaster2024
    Author

    On this case can I close this issue? or wait for you close this when test is configure for skip?

  3. Truta446 commented on Oct 27, 2026

    @Truta446

    Please keep it open for now. It should be closed once #24789 is merged; the maintainer who merges it usually closes the issue, so you don't need to do anything. Same for GH-23874, which depends on #24406.

    If you have a moment, it would help to confirm the fix in your Fedora 44 environment: with the patch from #24789 applied, ext/iconv/tests/gh7980.phpt should be reported as SKIP ("windows-1258 is not supported by this iconv implementation") instead of FAIL. Installing glibc-gconv-extra should make it run and pass again.

  4. added 2 commits that reference this issue on Oct 27, 2026
    98043f3
    9fccc1c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions