neitanod / forceutf8

PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.
1.63k stars 369 forks source link

UTF8 encoding issue where curly single apostrophe being converted as? #81

Open cbielich opened 5 years ago

cbielich commented 5 years ago

I am having an issue with where a curly apostrophe is being converted as a ?

you’ll

converts to

you?ll

Any ideas on how to fix this?

chriseikermann commented 5 years ago

I also want a fix for that, otherwise I need to fix it.

neitanod commented 5 years ago

That happens when you use toUTF8() or fixUTF8() ?

On Thu, Sep 5, 2019, 12:48 chriseikermann notifications@github.com wrote:

I also want a fix for that, otherwise I need to fix it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/neitanod/forceutf8/issues/81?email_source=notifications&email_token=AAWP6XXBEQVPOYVWCXDXJXTQIES45A5CNFSM4ISUYRBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD57UE3I#issuecomment-528433773, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWP6XRY2HDK3X7JDXDNAATQIES45ANCNFSM4ISUYRBA .

chriseikermann commented 5 years ago

it happened for fixUTF8()

Test::identical("Chris’d", Encoding::fixUTF8("Chris’d"), "Chris’d");

or is it necessary to use Encoding::ICONV_TRANSLIT

adrianbj commented 4 years ago

Just wanted to say thanks for this library, but note that I am also seeing this bug, even with a simple:

Encoding::::fixUTF8(('you’ll')

No issue with that when using toUTF8 instead.