解決 UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
![圖片](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBnf02g_S6NQExQ9I3od2QTpMhi14IlJveSb1o-3dm2QoEzsjT1WTYaME01J0gP4z_HcBkt7sfPWFq907VHvhs1iCg9yBCu8I22VTYRacUudjNcyoowBz7LCvuyqdqKp-pMOQU9gVGLw/s1600/lee-campbell-86958-1100.jpg)
最近使用 Flask 把接收到的資料 print 出來時,卻出現了這個錯誤訊息: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128) 神奇的是,在兩台電腦上測試,卻只有一台出現這個問題,只好繼續追查下去。 然後從 debug 介面中,看到了更詳細的錯誤訊息: