[full-ci] Convert from utf8_encode to mb_convert_encoding#40158
Merged
phil-davis merged 1 commit intomasterfrom Jun 21, 2022
Merged
[full-ci] Convert from utf8_encode to mb_convert_encoding#40158phil-davis merged 1 commit intomasterfrom
phil-davis merged 1 commit intomasterfrom
Conversation
d88c4af to
17f56e0
Compare
|
Kudos, SonarCloud Quality Gate passed! |
jvillafanez
approved these changes
Jun 21, 2022
Contributor
|
Confirmed fixed in 10.11.0-rc.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.








Description
https://wiki.php.net/rfc/remove_utf8_decode_and_utf8_encode
https://www.php.net/manual/en/function.utf8-encode.php is being deprecated in PHP 8.2 and removed at some time in the future. I happened to notice this while looking at other things. There is an easy change to https://www.php.net/mb_convert_encoding so, IMO, we may as well do it now.
https://github.com/sabre-io/http/blob/master/CHANGELOG.md#500-alpha1-2018-02-16
Sabre\HTTP\URLUtilwas removed back in 2018 and the code has changed anyway, so I removed the out-dated comment related to that.I added a unit test case for filename
pound-cent-AE-%A3%A2%C6-in-ISO-8859-1- that has 3 ISO8859-1 "Latin-1" special characters in it. For that case, the code goes through the changed line and does produce the expected UTF-8 encoding. That unit test case passes with the previous code (I ran it manually), and still passes with the changed code. So there is not any obvious regression.Related Issue
How Has This Been Tested?
CI
Types of changes
Checklist: