Skip to content

Conversation

uzulla
Copy link
Contributor

@uzulla uzulla commented Oct 6, 2025

The judgement that an empty array return from mb_encoding_aliases indicates an invalid encoding name was incorrect.

sample.

# php 8.0+

## get all list
php > var_dump(mb_list_encodings());
<snip>
  [61]=>
  string(2) "HZ"
<snip>
}

## HZ does not have aliases, but that's not an error.
php > var_dump(mb_encoding_aliases("HZ"));
array(0) {
}

# php 7.4 (same as 8.0+)
php > var_dump(mb_encoding_aliases("HZ"));
array(0) {
}

@oscarotero oscarotero merged commit b791f12 into php-embed:master Oct 6, 2025
6 checks passed
@oscarotero
Copy link
Collaborator

thank you!

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.

2 participants