removed some unicode byte order marks; fixes #277

This commit is contained in:
following
2013-07-26 12:04:59 +02:00
parent bfc3a31363
commit 7e73badfae
8 changed files with 57 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
{***************************************************************************
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ

View File

@@ -1,4 +1,4 @@
{***************************************************************************
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ

View File

@@ -1,4 +1,4 @@
{***************************************************************************
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ

View File

@@ -1,4 +1,4 @@
{***************************************************************************
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ

View File

@@ -1,4 +1,4 @@
{***************************************************************************
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ

View File

@@ -1,4 +1,4 @@
{***************************************************************************
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder メモ

View File

@@ -0,0 +1,51 @@
<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* Searches for Unicode byte order marks in code and template files
***************************************************************************/
chdir ("../../htdocs");
require('lib2/cli.inc.php');
scan('.',false);
foreach (
array('api', 'lang', 'lib', 'lib2', 'libse', 'okapi', 'templates2', 'util', 'util2', 'xml')
as $dir)
{
scan($dir,true);
}
exit;
function scan($dir, $subdirs)
{
$hDir = opendir($dir);
if ($hDir !== false)
{
while (($file = readdir($hDir)) !== false)
{
$path = $dir . '/' . $file;
if (is_dir($path) && substr($file,0,1) != '.' && $subdirs)
scan($path,$subdirs);
else if (is_file($path))
if ((substr($file, -4) == '.tpl') || (substr($file, -4) == '.php'))
testforbom($path);
}
closedir($hDir);
}
}
function testforbom($path)
{
$filestart = file_get_contents($path, false, null, 0, 2);
if (ord($filestart) > 126)
printf("%02X-%02X found in %s\n", ord($filestart), ord(substr($filestart,1)), $path);
}
?>