jawah/charset_normalizer

[DETECTION] from_path returns None for cp1251 encoded file

TheKiber opened this issue · 2 comments

Description
File content is not reading.
Method from_path returns None.

Steps to reproduce

  1. Copy test.txt to C:\test.txt
  2. Run _Charset-normalizer.txt as python script
  3. Ensure that from_path returns None

Expects
'from_path' result are the same or better than 'with open' result.

Logs

'with open' result:
	---- Начало операции с хранилищем конфигурации ----
	Объект захвачен для редактирования: РегистрСведе
'from_path' result:
	None
'from_path with cp_isolation' result:
	None

Desktop
OS: Windows 10 x64
Python version: 3.11.3
Charset-normalizer version: 3.1.0

Hello,

Thank you for the detailled report.
I can confirm that this reproduce. There is one or two things I can try to fix that particular case.
I don't know when it will be fixed, update will be posted here.

Ousret commented

Fixed in PR #306
Will be available on v3.2.0

Regards,