Skip to content

Conversation

@oliverhermanni
Copy link

Hi,

I replaced mb_convert_encoding, as it doesn't work sometimes (see also https://github.com/scotteh/php-goose/issues/69). neitanod/forceutf8 does a good job as a replacement. Never had any problems after that.

Hope, this one is also okay. :)

@scotteh
Copy link
Owner

scotteh commented Nov 15, 2017

Do you have an examples of the failures you mentioned?

@oliverhermanni
Copy link
Author

Yes, please check the URL mentioned in the issue at https://github.com/scotteh/php-goose/issues/69.

It's rare, but happened to me on several URLs I can't find right now. Had this fixed for a while, but never uploaded it.

@scotteh
Copy link
Owner

scotteh commented Nov 15, 2017

Thanks for the PR.

I'm a bit wary of adding dependencies if they're not essential. The existing code always attempted to convert even if the encoding wasn't available. Added checks to prevent this which should fix this issue.

Wasn't able to re-create the with the URL mentioned on scotteh/php-goose#69, but that does return a CDN 'browser check' page rather than the actual website contents. It's quite possible a page like this could cause some unusual issues.

If you're still having issues then it might be a matter of using neitanod/forceutf8.

@oliverhermanni
Copy link
Author

Yes, I understand that. Maybe a try-catch block would be helpful there so it won't return a 500 as it does now.

@rafwell
Copy link
Contributor

rafwell commented Aug 23, 2018

Maybe duplicate #11

@scotteh
Copy link
Owner

scotteh commented Nov 23, 2018

Merged #11 which will hopefully fix these issues without an external dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants