Fix "uvuni_to_utf8(): deprecated function being removed from Perl #50" #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #50 by replacing the deprecated
uvuni_to_utf8()
function withuvchr_to_utf8()
.Problem
The
uvuni_to_utf8()
function has been deprecated since Perl 5.32 and is now being removed from Perl blead, causing build failures for HTML::Parser. The function was used inutil.c
for converting Unicode code points to UTF-8 byte sequences when decoding HTML entities.Solution
Replace the single occurrence of
uvuni_to_utf8()
withuvchr_to_utf8()
inutil.c
. Both functions have identical signatures and behavior:Testing
A
→A
)é
→é
)☺
→☺
)😀
→😀
)This is a minimal, surgical fix that maintains full backward compatibility while ensuring the module continues to build on modern Perl versions.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.