You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UConverter::transcode() always emits an E_WARNING when an invalid encoding is specified #17469
The documentation should mention that passing an invalid/unsupported encoding name to this method will result in an E_WARNING being emitted (and no error code defined), regardless of the values set for intl.use_exceptions or intl.error_level.
changed the title [-]UConverter::transcode() behavior when an invalid encoding is specified[/-][+]UConverter::transcode() always emits an E_WARNING when an invalid encoding is specified[/+]on Jan 14, 2025
Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in /home/dcarlier/test-intl.php on line 2
Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in /home/dcarlier/test-intl.php on line 3
The issue is that it always emits a warning instead of being silenced/promoted to exception depending on the intl error setting as far as I understand.
Activity
Girgias commentedon Jan 14, 2025
This seems more like a bug in the intl extension than a documentation issue. So transferring to
php/php-src.[-]UConverter::transcode() behavior when an invalid encoding is specified[/-][+]UConverter::transcode() always emits an E_WARNING when an invalid encoding is specified[/+]devnexen commentedon Jan 14, 2025
@Girgias with the following
I get the E_WARNING
is there a missing case ?
Girgias commentedon Jan 15, 2025
The issue is that it always emits a warning instead of being silenced/promoted to exception depending on the intl error setting as far as I understand.
devnexen commentedon Jan 15, 2025
Ah thanks. will have a look soon-ish.