IE8 & Mysql & Sql server (UTF-8) Not support the files include characters [\xf0\x9d\x90\x80-\xf0\x9d\x9f\xbf].
We can replace them with *HTML Entity (decimal)* to save them into DB server, if you want use the binary of these characters, you can replace them back.
But Firefox can rightly display some of them.
The outcome of *Wikipedia*, Mysql server (also IE8) not support high code characters :
http://bugs.mysql.com/bug.php?id=14052
useful urls:
http://www.isthisthingon.org/unicode/pfpopup.php?page=1D&subpage=4
http://www.fileformat.info/info/unicode/block/mathematical_alphanumeric_…
The best solution is to upgrade to MYSQL 6.0 and use utf-16 or utf-32 encoding, but Mysql 6.0 is so new and utf-16 is not widely supported by browser or open source software.
命令行:
- find . -name *.module |xargs wc -l
- find . -name *.inc | xargs wc -l
- find . -name *.php |xargs wc -l
- find . -name *.install |xargs wc -l
PHP版本:
- exec("find /mnt/site -name *.module |xargs wc -l ", $res, $rc);
- $res = array_reverse($res);
- $t1 = explode(' ', $res[0]);
-
- exec("find /mnt/site -name *.inc |xargs wc -l ", $res, $rc);
- $res = array_reverse($res);
- $t2 = explode(' ', $res[0]);
-
- exec("find /mnt/site -name *.install |xargs wc -l ", $res, $rc);
- $res = array_reverse($res);
- $t3 = explode(' ', $res[0]);
-
- echo "Total " . $t1[1] + $t2[1] + $t3[1];
1. function binhex($str) {
2. $hex = “”;
3. $i = 0;
4. do {
5. $hex .= sprintf(“%02x”, ord($str{$i}));
6. $i++;
7. } while ($i < strlen($str));
8. return $hex;
9. }
已知非正常空白: \xc2\xa0 \xe3\x80\x80
参照http://lcweb2.loc.gov/diglib/codetables/9.4.html