Pull to refresh
0
0
Send message
Привет! Товарищ  @alex-khv прав.
Python по умолчанию использует системную кодировку. для Windows = cp 1251
Официальный док — В доке как раз написано то самое поведение которое вы наблюдаете:
Windows still uses legacy encodings for the system encoding (the ANSI Code Page). Python uses it for the default encoding of text files (e.g. locale.getpreferredencoding()).

This may cause issues because UTF-8 is widely used on the internet and most Unix systems, including WSL (Windows Subsystem for Linux).


Такая ситуация встречается не только в Django. Крайне рекомендую явно указывать кодировку в которой вы собираетесь читать \ записывать файлы.

Information

Rating
Does not participate
Registered
Activity