2

I encountered a behaviour I can't get a grip on and am stuck googling it.

A picture named ö.png doesn't get found if I'm trying to serve it with php -S localhost:4545.

I attached a picture with - hopefully - all the necessary informations. It's a basic example to reproduce the behaviour.

I now that this works on a linux server but how could I get it to work no a PC serving via PHP?

enter image description here

greeven
  • 110
  • 2
  • 10
  • So in short: you might get it to work somehow but nobody want's to do that and you shouldn't too. I'm still interested in how this could be accomplished though. – greeven Dec 19 '18 at 20:13
  • 1
    Iterate through the files in the directory (e.g. `scandir`) and find the one you need, and `rawurlencode` it. That should give you the file name as the OS sees it. – deceze Dec 19 '18 at 21:16
  • Awesome, thank you! The `ö.png` whichs showed as `%C3%B6.png` really is `%25C3%25B6.png`. Might be obvious for others but I'm satisfied and feel a heavy stone lifted from my head. Thanks @deceze – greeven Dec 19 '18 at 22:03

0 Answers0