Re: Figuring out file-encoding
| From: | Jeffrin Jose | Date: | Mon, 28 Feb 2011 19:44:12 +0000 |
| Subject: | Re: Figuring out file-encoding | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311595@lists.php.net to get a copy of this message | ||
On Mon, Feb 28, 2011 at 06:20:30PM +0100, Asmann, Roland wrote:
> I need to read several files from the HD, but they are saved in
> different encodings. Can I somehow figure out which encoding I should
> use when reading the file?
i think detect the file encoding and decode it.
as for detection try using mb_detect_encoding function.
http://php.net/manual/en/function.mb-detect-encoding.php
it works with (PHP 4 >= 4.0.6, PHP 5)
/Jeffrin.
--
software engineer.
department of computer science
rajagiri school of engineering and technology.