fixed some file encodings and unicode reminders

This commit is contained in:
following
2013-07-28 15:01:23 +02:00
parent 6b807fa469
commit f10e83ec3b
10 changed files with 66 additions and 9 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
/***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ??
* Unicode Reminder メモ
*
* For more information about this smarty-extension see
* prefilter.t.php
@@ -1,7 +1,7 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ..
* Unicode Reminder メモ
***************************************************************************}
<div class="content2-pagetitle">
@@ -1,7 +1,7 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ..
* Unicode Reminder メモ
***************************************************************************}
<div class="content2-pagetitle">
<img src="resource2/{$opt.template.style}/images/cacheicon/traditional.gif" style="align: left; margin-right: 10px;" width="32" height="32" alt="" />&Uuml;ber Geocaching
@@ -1,7 +1,7 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ??
* Unicode Reminder メモ
***************************************************************************}
<div class="content2-pagetitle">
@@ -1,7 +1,7 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ??
* Unicode Reminder メモ
***************************************************************************}
<div class="content2-pagetitle">
<img src="resource2/{$opt.template.style}/images/cacheicon/traditional.gif" style="align: left; margin-right: 10px;" width="32" height="32" alt="" />About Geocaching
@@ -1,7 +1,7 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ??
* Unicode Reminder メモ
***************************************************************************}
<div class="content2-pagetitle">
<img src="resource2/{$opt.template.style}/images/misc/32x32-impressum.png" style="align: left; margin-right: 10px;" width="32" height="32" alt="" /> Legal information
@@ -1,7 +1,7 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ..
* Unicode Reminder メモ
***************************************************************************}
<div class="content2-pagetitle">
@@ -1,7 +1,7 @@
{***************************************************************************
* You can find the license in the docs directory
*
* Unicode Reminder ..
* Unicode Reminder メモ
***************************************************************************}
<div class="content2-pagetitle">
<img src="resource2/{$opt.template.style}/images/cacheicon/traditional.gif" style="align: left; margin-right: 10px;" width="32" height="32" alt="" />Cosa è il Geocaching
+55
View File
@@ -0,0 +1,55 @@
<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* Searches for files which are no longer Unicode-encoded
***************************************************************************/
chdir ("../../htdocs");
require('lib2/cli.inc.php');
scan('.', false);
foreach (
array('api', 'lang', 'lib', 'lib2', 'libse', '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'))
test_encoding($path);
}
closedir($hDir);
}
}
function test_encoding($path)
{
$contents = file_get_contents($path, false, null, 0, 2048);
$ur = stripos($contents, "Unicode Reminder");
if ($ur)
if (mb_trim(mb_substr($contents, $ur+17,2)) != "メモ")
echo "Bad Unicode Reminder found in $path: ".mb_trim(mb_substr($contents, $ur+17,2))."\n";
}
?>
+3 -1
View File
@@ -11,13 +11,15 @@ chdir ("../../htdocs");
require('lib2/cli.inc.php');
scan('.',false);
scan('.', false);
foreach (
array('api', 'lang', 'lib', 'lib2', 'libse', 'okapi', 'templates2', 'util', 'util2', 'xml')
as $dir)
{
scan($dir,true);
}
exit;