Problem/Motivation
When switching to PHP 8.2 got warning Call to deprecated function utf8_encode in modules/contrib/feeds/plugins/FeedsProcessor.inc, line 1484
Proposed resolution
I could suggest to use mb_convert_encoding
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | feeds-php8-2-3426334.patch | 601 bytes | Dmitrii_Zadorozhnyi |
Comments
Comment #2
Dmitrii_Zadorozhnyi commentedComment #3
megachrizThanks for the patch, but I think there's a small error in it:
I think that the parameters 'ISO-8859-1' and 'UTF-8' need to be swapped:
$string,$to_encoding,$from_encoding. So the desired encoding of the result, in this case 'UTF-8' is the second parameter. The third parameter is the current encoding used to interpret string, in this case ' ISO-8859-1'.By the way: I see that the tests report much more PHP 8.2 deprecations, but these could be handled in an other issue.
Comment #4
Dmitrii_Zadorozhnyi commentedFixed
Comment #6
megachrizThanks! Committed #4.
Comment #7
Dmitrii_Zadorozhnyi commented