Skip to content

Conversation

tomsommer
Copy link
Contributor

in_array() is case-sensitive and $parameters['charset'] is lower-case while mb_list_encodings() is upper-case

in_array() is case-sensitive and $parameters['charset'] is lower-case while mb_list_encodings() is upper-case
@tomsommer
Copy link
Contributor Author

Fixes #148

@HighOnMikey
Copy link

👍

Although probably might be better to use if (empty(preg_grep('/' . $parameters['charset'] .'/i', mb_list_encodings()))) {}

@shacky
Copy link

shacky commented Jul 21, 2016

thanks for bug resolution! it should be merged.

@deemyboy
Copy link

so has this fix been merged or not?

Copy link

@dmromanov dmromanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good.

Copy link

@dmromanov dmromanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output of mb_list_encodings() must be converted to upper-case too, because not all encodings returned are upper-case. For example, "Windows-1251".

Copy link

@dmromanov dmromanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

@nurtext
Copy link

nurtext commented Sep 4, 2018

Will this PR ever be merged & closed?

nurtext pushed a commit to nurtext/Fetch that referenced this pull request Sep 5, 2018
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.

6 participants