|
Posted by daemon on 11/18/05 18:32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thomas Podlesak wrote:
> I need a check, if a file is utf8 encoded. I only found the php-functions
> 'iconv' and 'recode'. But it seems it´s not possible to determine the
> encoding with them. Isn´t there any similar function to the 'file'-command
> on linux for php?
Ok, I'm barly understanding your request. UTF/UTF8/UTF16 affects the
character set of your file. Now all HTML files can configure the browser
to determin the character set just be defining:
<meta http-equiv="Content-Type" content="application/xml+xhtml;
charset=UTF-8" />
As well, if your sending PHP encoded file, you can pre-determin the
filetype just by defining the character encoding threw the headers:
header("Content-Type: application/xml+xhtml; charset=utf-8");
Other then that, the rest is done threw your web server, picking the
file... that if you wanted to encode it further you would have to
convert it using the functions you said above.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDfmPQ/WE0aXnOUiYRArvoAJ4tE6s7WPSRtBZg1tLdFgJmFL5MNQCbBKUe
GR3X5SE21hzNzW4k2UOh7f8=
=xJ0s
-----END PGP SIGNATURE-----
[Back to original message]
|