How to determine character encoding of a file?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I need a function to determine if a file is utf-8 encoded. I found the
inconv- and recode-functions. But they only seem to convert files. Isn´t
there any php-function similar to the 'file'-command on linux?

Site Timeline