Вопрос

I have some scraped data in some pretty weird shape. It looks like this:

%C3%96lkis

When converted, it should look like this:

Ölkis

I googled some, and found that %C3%96 is presumably UTF-8 Hex for the character Ö.

There's lots of special characters in my data escaped/converted like this into different UTF-8 Hex codes.

So how do I convert it back to a normal string?

Это было полезно?

Решение

It looks like your data is url encoded, you want to use PHP's urldecode function

urldecode("%C3%96lkis") = 'Ölkis'
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top