Re: Check for UNICODE

From: Date: Thu, 07 Dec 2000 04:17:11 +0000
Subject: Re: Check for UNICODE
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29051@lists.php.net to get a copy of this message
You could maybe try this: exec("file /full/path/to/whatever.txt", $result, $errorCode); while (list(,$line) = each($result)){ echo $line, "<BR>\n"; } if ($errorCode) die("OS Error code: $errorCode. Usually path/permissions."); You may need to provide the full path to the "file" command. man file whereis file would be useful. This all assumes you're on Un*x. Under Windows, all bets are off. Oh, I'm assuing Unicode to ASCII conversion is in http://php.net somewhere... ----- Original Message ----- From: "Jason Lavigne" <jlavigne@stonecroft.net> Newsgroups: php.general Sent: Wednesday, December 06, 2000 1:54 PM Subject: [PHP] Check for UNICODE Does anyone know if it is possible for PHP (via a function or class) to know if a file on the hard drive is in UNICODE format? Second question, is there a way in PHP (via a function or class) to convert files from UNICODE to ASCII? _______________________________ Jason (Jay) Lavigne Web Application Developer Stratagene Canada (416) 593-3770 ext. 2771

« previous php.general (#29051) next »