Skip to content

Vendor encoding conversion code from mbstring#45

Merged
rlerdorf merged 1 commit intophp:masterfrom
alexdowad:decode
Apr 5, 2026
Merged

Vendor encoding conversion code from mbstring#45
rlerdorf merged 1 commit intophp:masterfrom
alexdowad:decode

Conversation

@alexdowad
Copy link
Copy Markdown
Contributor

While mailparse uses mbstring to handle Base64 and QPrint byte encodings, this functionality is deprecated in mbstring and scheduled for removal in PHP 9. Since the needed code will be removed from mbstring, we can give it a new home here in mailparse. This means that mailparse will continue to work under PHP 9. Also, it means that mailparse is no longer dependent on mbstring being compiled into the main PHP binary; it can be used with any PHP binary, even if mbstring is not present.

I've modified function name prefixes from mbfl_ to mb_, so that there are no name conflicts with the functions which are (temporarily) still included in mbstring (but will be removed a bit later).

FYA @remicollet @youkidearitai @ndossche @cmb69

While mailparse uses mbstring to handle Base64 and QPrint byte encodings, this functionality
is deprecated in mbstring and scheduled for removal in PHP 9. Since the needed code will be
removed from mbstring, we can give it a new home here in mailparse. This means that mailparse
will continue to work under PHP 9. Also, it means that mailparse is no longer dependent on
mbstring being compiled into the main PHP binary; it can be used with any PHP binary, even
if mbstring is not present.
@alexdowad
Copy link
Copy Markdown
Contributor Author

Hmm, Windows build is failing with this error:

toolset not available

The failure doesn't seem to have anything to do with the content of the PR.

@youkidearitai
Copy link
Copy Markdown

youkidearitai commented Jan 20, 2026

My environment (Windows 11, x64, PHP-8.6.0-dev (php/php-src@b17b699)) is confirmed works fine.

@rlerdorf rlerdorf merged commit 9894135 into php:master Apr 5, 2026
6 of 10 checks passed
@remicollet remicollet mentioned this pull request Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants