[PHP] Figuring out file-encoding

2011-02-28 Thread Asmann, Roland
Hi all,

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?

Thanks.

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Figuring out file-encoding

2011-02-28 Thread Jeffrin Jose
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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php