I’m writing a web application where the user upload a zip file that contains properties files and images.
I want to validate that the properties files only contains ASCII characters. Is there a way in PHP to check the whole file and return an error if a non-ASCII character is found?
Thanks.
You can use:
mb_detect_encoding():A regular expression: