Is there a way which checks a CSV-file for UTF-8 without BOM encoding? I want to check the whole file and not a single string.
I would try to set the first line with a special character and than reading the string and checking if it matches the same string hard-coded in my script. But I don’t know if this is a good idea.
Google only showed me this. But the link in the last post isn’t available.
You can also go through it line by line with
fgets, if the file is large and you don’t want to store it all in memory at once. Not sure what you mean by the second part of your question.