? Reading Lines From a Unicode and/or ANSI Files

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


I am trying to write a PHP script to grab a line from a REG file (Windows
registry export). It's easy enough to do so for ones that are ANSI encoded, but
sometimes they are Unicode, and I cannot find a way (that works) to read lines
from those.

So, how can I read a line from a file, detect whether or not it is Unicode and
convert it to ANSI if it is?

Thanks a lot.

Alec S.

Site Timeline