[Tutor] Unknown encoded file types.

Mark Lawrence breamoreboy at gmail.com
Wed Feb 10 23:22:07 EST 2021


On 10/02/2021 22:05, dn via Tutor wrote:
> On 10/02/2021 23.47, mhysnm1964 at gmail.com wrote:
>> All,
>>
>> Thank you for your assistance. After doing more investigation. There is some
>> unusual characters in the files which look like French or similar languages.
>> So I will play with your kind code samples and libraries to see what is
>> being used.
> 
> 
> Which leads this non-MS-Win user to ask:
> 
> if UTF-8/standard Python has 'trouble' understanding files originally
> created in ISO 8859-n locale, eg MS-Win's Latin-1 etc; given MSFT's
> assumptions of eco-system/world-domination, does today's version of
> Win10 enjoy suitable backwards-compatibility and thus have no
> difficulties, eg a FileManager listing file-names or a NotePad
> displaying text-content?
> 
> (is a/the solution to 'upgrade' to UTF-8 'there', and thereafter
> Python's I/O will perform without incident)
> 

There's some interesting debate about 
https://www.python.org/dev/peps/pep-0597/ -- Add optional 
EncodingWarning here 
https://mail.python.org/archives/list/python-dev@python.org/thread/SFYUP2TWD5JZ5KDLVSTZ44GWKVY4YNCV/ 
if anybody is interested.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list