cvs: php-news-web / common.inc
| From: | Wez Furlong | Date: | Wed, 11 Sep 2002 11:17:52 +0000 |
| Subject: | cvs: php-news-web / common.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-12417@lists.php.net to get a copy of this message | ||
wez Wed Sep 11 07:17:52 2002 EDT
Modified files:
/php-news-web common.inc
Log:
Make modelines actually work.
Add fallback in case there is not charset conversion support available.
Index: php-news-web/common.inc
diff -u php-news-web/common.inc:1.16 php-news-web/common.inc:1.17
--- php-news-web/common.inc:1.16 Wed Sep 11 07:15:38 2002
+++ php-news-web/common.inc Wed Sep 11 07:17:52 2002
@@ -1,4 +1,4 @@
-<?php /* vim:set ft=php:ts=2:sw=2:et */
+<?php # vim:ft=php:ts=2:sw=2:et
function head($title="php news") {
header("Content-type: text/html; charset=utf-8");
@@ -82,6 +82,11 @@
function to_utf8($str, $charset)
{
return iconv(strlen($charset) ? $charset : "iso-8859-1", "utf-8", $str);
+ }
+} else {
+ function to_utf8($str, $charset)
+ {
+ return $str;
}
}