I have a strange issue here and I'm hoping that someone can shed some light on this for me. I'm looking for why this behavior occurs and how I can overcome it with PHP.
I have a directory with names of people and some of those names use ASCII characters. The one that I'm having an issue with is the e-acute é
. I am using scandir
to get the contents of the directory. One of the names containing the e-acute fails, while others using the same character do not fail. I've copied the characters into my IDE and the character that scandir fails on, reports that it is a regular e
, although that not what I'm visually looking at; these characters look identical to me.
These are the characters that succeed and fail:
é This one shows as a regular 'e' and fails with scandir
é This one shows as e-acute and succeeds with scandir
Can someone tell me why this is? Also, is there a way to do a conversion on these types of characters so that I can be sure that scandir will not fail?
I should mention that I am already using a UTF8 header at the top of the script.