[Python-ideas] os.path.isbinary
Antoine Pitrou
solipsis at pitrou.net
Mon Aug 12 16:01:21 CEST 2013
Le Mon, 12 Aug 2013 15:42:23 +0200,
"Philipp A." <flying-sheep at web.de> a écrit :
> well, the only remotely valid thing to do is to test if the input
> data is decodable with any of the encodings python knows.
>
> if we do some arbitrary threshold, we only get bugs like fedora’s
> current release name “Schrödinger's Cat” being considered “not text”.
> i’d never write code like
> this<https://github.com/hwoarang/libreport/blob/master/src/lib/problem_data.c#L272>
Truly horrible :-(
More information about the Python-ideas
mailing list