(original) (raw)
On 30 April 2013 10:42, M.-A. Lemburg <mal@egenix.com> wrote:
but there's no API to ask the search functions for a list of supportedIt would be possible to get a list of registered codec search functions,
codecs.
OK, so there's no way to determine in advance what values of enc will work in bytestr.decode(enc) or str.encode(enc)?
Is there a reason why not? As I say, a tool that offers to re-encode a file could reasonably be expected to list the encodings it supported (if only to help the user work out which way to spell utf-16le or utf16le or utf16-le or utf-16-le or... :-))
I've raised http://bugs.python.org/issue17878�for this. Further discussion may be more appropriate there than on python-dev.
Paul