Re: Check for UNICODE
| From: | Jason Lavigne | Date: | Fri, 08 Dec 2000 00:17:57 +0000 |
| Subject: | Re: Check for UNICODE | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29112@lists.php.net to get a copy of this message | ||
Thank you, this may just do the trick. When the function is done I will post
it :)
Jay
----- Original Message -----
From: "Richard Lynch" <richard@zend.com>
To: <php-general@lists.php.net>
Sent: Wednesday, December 06, 2000 11:17 PM
Subject: Re: [PHP] Check for UNICODE
> 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
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>