Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DETECTION] from_path returns None for cp1251 encoded file #289

Closed
TheKiber opened this issue May 4, 2023 · 2 comments
Closed

[DETECTION] from_path returns None for cp1251 encoded file #289

TheKiber opened this issue May 4, 2023 · 2 comments
Labels
detection Related to the charset detection mechanism, chaos/mess/coherence

Comments

@TheKiber
Copy link

TheKiber commented May 4, 2023

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

@Ousret Ousret added the detection Related to the charset detection mechanism, chaos/mess/coherence label May 7, 2023
@Ousret
Copy link
Member

Ousret commented May 7, 2023

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 Ousret changed the title [BUG] from_path returns None for cp1251 encoded file [DETECTION] from_path returns None for cp1251 encoded file May 7, 2023
@Ousret Ousret mentioned this issue Jul 7, 2023
@Ousret
Copy link
Member

Ousret commented Jul 7, 2023

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

Regards,

@Ousret Ousret closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detection Related to the charset detection mechanism, chaos/mess/coherence
Projects
None yet
Development

No branches or pull requests

2 participants