用于记录一些简短的想法
// 不一定总是可行function strip_invalid_utf8($text){ $text = iconv("UTF-8", "UTF-8//IGNORE", $text); return $text;}
« [4][5][6][7][8][9][10][11][12] » 8/45
你想加入百度吗?
查看结果
解决: php.ini, expose_php = No Reply
查看进程打开了哪些文件: lsof -p PID Reply
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 35-36: ordinal not in range(128)
可以这样:
import sys
reload(sys)
sys.setdefaultencoding(‘utf-8′) Reply
import traceback
s = traceback.format_exc()
print s Reply
set nocompatible
set shiftwidth=4
set tabstop=4
"set langmenu=english
set autoindent
"colors torte
set nu
syntax on
set encoding=utf-8
set incsearch Reply
Reply