svn: /web/doc-editor/trunk/php/ class.php
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Wed, 11 Nov 2009 21:51:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290554
Log:
Remove getFileEncoding's method from class.php. This method is present in File.php as getEncoding's method
Changed paths:
U web/doc-editor/trunk/php/class.php
Modified: web/doc-editor/trunk/php/class.php
===================================================================
--- web/doc-editor/trunk/php/class.php 2009-11-11 21:50:30 UTC (rev 290553)
+++ web/doc-editor/trunk/php/class.php 2009-11-11 21:51:12 UTC (rev 290554)
@@ -734,32 +734,6 @@
}
/**
- * Get encoding of a file, regarding his XML's header.
- *
- * @param $file The file to get encoding from.
- * @param $mode The mode. Must be 'file' if $file is a path to the file, or 'content' if $file is the content of the file.
- * @return The charset as a string.
- */
- function getFileEncoding($file, $mode) {
-
- if ($mode == 'file' ) {
- $txml = file_get_contents($file);
- } else {
- $txml = $file;
- }
-
- $txml = preg_replace('/\\s+/', ' ', $txml);
-
- $match = array();
- preg_match('!<\?xml(.+)\?>!U', $txml, $match);
- $xmlinfo = $this->revParseAttrString($match);
-
- $charset = (isset($xmlinfo[1]['encoding'])) ? strtolower($xmlinfo[1]['encoding']) : 'iso-8859-1';
-
- return $charset;
- }
-
- /**
* Get the content of a file.
*
* @param $FilePath The path of the file.