Re: file type and recode

From: Date: Thu, 31 Aug 2006 11:39:25 +0000
Subject: Re: file type and recode
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-241271@lists.php.net to get a copy of this message
On Wed, 30 Aug 2006, Curt Zirzow wrote:
On 8/29/06, Martin Marques <martin@bugs.unl.edu.ar> wrote:
Simple question: Is there a built-in function in PHP to get the charset of a file, so that I can pass the right parameters to recode_file()?
It depends. If it is a .txt file (nope) a .doc file (mabey, pending the .doc format) a .xml file (most likely, unless it is a poorly formatted xml file) It all depends how the document is stored and if it keeps the charset within the document.
I want something more like the output of the unix command "file -i" (without running a system call). And yes, they are text files. -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 ---------------------------------------------------------
Lic. Martín Marqués         |   SELECT 'mmarques' ||
Centro de Telemática        |       '@' || 'unl.edu.ar';
Universidad Nacional        |   DBA, Programador,
    del Litoral             |   Administrador
---------------------------------------------------------

« previous php.general (#241271) next »