OSDN Git Service

Please use abstruct method $vars instead of $get or $post
[pukiwiki/pukiwiki.git] / mbstring.php
index 3a1f7c1..e3e33f7 100644 (file)
@@ -2,38 +2,44 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: mbstring.php,v 1.8 2003/11/17 00:14:57 arino Exp $
+// $Id: mbstring.php,v 1.12 2004/06/19 04:03:24 henoheno Exp $
 //
 
 /*
- * PHP¤Îmbstring extension¤¬»ÈÍѤǤ­¤Ê¤¤¤È¤­¤ÎÂåÂشؿô
+ * mbstring extension ¤¬¥µ¡¼¥Ð¡¼Â¦¤Ë¸ºß¤·¤Ê¤¤»þ¤ÎÂåÂشؿô
  *
  * Ãí°Õ»ö¹à
  *
- * EUC-JPÀìÍѤǤ¹¡£
+ * 1. ¼ÂºÝ¤Ë´Á»ú¥³¡¼¥ÉÊÑ´¹¤ò¹Ô¤ï¤»¤ë¤¿¤á¤Ë¤Ï¡¢ÊÌÅÓ jcode.php
+ *    (TOMOºî)¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
  *
- * »ÈÍÑÊýË¡
- *
- * jcode_1.34.zip (http://www.spencernetwork.org/)¤òÆþ¼ê¤·¤Æ¡¢
- * mbstring.php¤ÈƱ¤¸¤È¤³¤í¤Ë¥Ç¥£¥ì¥¯¥È¥êÉÕ¤­¤ÇŸ³«¤·¤Æ¤¯¤À¤µ¤¤¡£
+ *   http://www.spencernetwork.org/jcode/ ¤è¤êjcode¤òÆþ¼ê¤·¡¢
+ *   °Ê²¼¤ÎÍͤËŸ³«¤·¤Æ¤¯¤À¤µ¤¤¡£
  * 
- * -+--- mbstring.php          -r--
- *  +-+- jcode_1.34/           dr-x
- *    +--- readme.txt          -r--
- *    +--- jcode.phps          -r--
- *    +--- jcode_wrapper.php   -r--
- *    +--- code_table.ucs2jis  -r--
- *    +--- code_table.jis2ucs  -r--
+ *   -+--- mbstring.php          -r--
+ *    +-+- jcode_1.34/           dr-x
+ *      +--- readme.txt          -r--
+ *      +--- jcode.phps          -r--
+ *      +--- jcode_wrapper.php   -r--
+ *      +--- code_table.ucs2jis  -r--
+ *      +--- code_table.jis2ucs  -r--
+ *
+ * 2. EUC-JPÀìÍѤǤ¹¡£(½ÐÎϤµ¤ì¤ë¥Ç¡¼¥¿¤¬EUC-JP¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹)
  *
  */
 
-if (is_readable('jcode_1.34/jcode_wrapper.php'))
+// jcode¤Î½êºß
+define('JCODE_DIR','./jcode_1.34');
+
+if (is_readable(JCODE_DIR . '/jcode_wrapper.php'))
 {
-       require_once('jcode_1.34/jcode_wrapper.php');
+       require_once(JCODE_DIR . '/jcode_wrapper.php');
 }
+
+// jcode¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¡¢¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»ú¤ä´Á»ú¥³¡¼¥É¤ò°·¤¨¤Ê¤¤
 if (!function_exists('jcode_convert_encoding'))
 {
-//     die_message('Multibyte functions cannot be used. Please read "mbstring.php" for an additional installation procedure.');
+//     die_message('Multibyte functions cannot be used. Please read "mbstring.php" for an additional installation procedure of "jcode".');
        function jstrlen($str)
        {
                return strlen($str);
@@ -214,6 +220,6 @@ function mb_strlen($str,$encoding='')
 function mb_substr($str,$start,$length=NULL,$encoding='')
 {
        // Ãí: EUC-JPÀìÍÑ, $encoding¤ò»ÈÍѤ·¤Ê¤¤
-       return jsubstr($str,$start,($length == NULL) ? jstrlen($str) : $length);
+       return jsubstr($str,$start,($length === NULL) ? jstrlen($str) : $length);
 }
 ?>