I have an app visiting URLs automatically through links. It works good as long as the URL doesn't contain Unicode.
For example, I have a link:
<a href="https://example.com/catalog/kraków/list.html">Kraków</a>
The link contains just pure ó character in the source. When I try to do:
$href = $crawler->filter('a')->attr('href');
$html = file_get_contents($href);
It returns 404 error. If I visit that URL in the browser, it's fine, because the browser replaces ó to %C3%B3.
What should I do to make is possible to visit that URL via file_get_contents()
?