Paul Prescod wrote:

> I went based on the current setdefaultencoding. But it seems that we will
> accumulate 3 or 4 related functions so I'm pursuaded that there should be a
> module.
>
> encodingdetection.setdefaultfileencoding
> encodingdetection.registerencodingdetector
> encodingdetection.guessfileencoding(filename)
> encodingdetection.guessfileencoding(bytestream)
>
> Suggestion accepted.

There's no need for implementing a separate infrastructure for encoding 
detection. This can be implemented as a "meta codec".
See http://styx.livinglogic.de/~walter/xml_codec/xml_codec.py for a codec that 
autodetects the XML encoding.

Servus,
   Walter



_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to