Catso
Catso

Reputation: 153

Character encoding mystery ( working flawlessly for me, but unfortunately not for all )

I have a content manager website, where character encoding working wonderfully for almost everyone, but not for a few "lucky" users, which drives me crazy.

I have a (search) keyword database table (log) which sometimes shows very strange keywords (the keyword originally was in Hungarian but something happened with it ) For example the database shows:

gyerekeknek papã rbã³l

instead of

gyerekeknek papírból

I can't replicate the culprit word/encoding or url because it works flawlessly for me with every accents and even different languages (such as Cyrillic letters, Chinese and special characters etc).

An average search url look like this:

https://example.com/keyword=árvíztűrő+tükörfúrógép OR: https://example.com/keyword=%c3%a1rv%c3%adzt%c5%b1r%c5%91+t%c3%bck%c3%b6rf%c3%bar%c3%b3g%c3%a9p

And it works absolutely fine (the database row for this is "árvíztűrő tükörfúrógép" as expected)

The strange thing: The GET['keyword'] param seems like it is already in the wrong encoding format ("gyerekeknek papã rbã³l") when it arrives (without any jquery/php validation and/or processing).

My website and database is UTF8 encoded everywhere. My website has:

Any idea or help is greatly appreciated, Thank you!

Upvotes: 0

Views: 32

Answers (0)

Related Questions