字串在Python內部的表示是Unicode編碼,因此,在做編碼轉換時, ... u = '中文' #指定字串型別物件u str = u.encode('gb2312') #以gb2312編碼對u進行 ...
確定! 回上一頁