Improve accuracy of encoding error handling.
Improve accuracy of encoding error handling.

datadesk/panda,ibrahimcesar/panda,ibrahimcesar/panda,pandaproject/panda,newsapps/panda,NUKnightLab/panda,NUKnightLab/panda,ibrahimcesar/panda,PalmBeachPost/panda,ibrahimcesar/panda,NUKnightLab/panda,newsapps/panda,pandaproject/panda,PalmBeachPost/panda,datadesk/panda,newsapps/panda,newsapps/panda,NUKnightLab/panda,datadesk/panda,PalmBeachPost/panda,datadesk/panda,PalmBeachPost/panda,datadesk/panda,pandaproject/panda,pandaproject/panda,PalmBeachPost/panda,pandaproject/panda,ibrahimcesar/panda