Hi,
I hope the encoding type of the download plintext file is ANSI, not UTF-8.
View.py
...
with open(file_path + filename, 'r', encoding='cp949') as fd:
# This plain text file from inside the server is an ANSI (cp949) encoded file.
response = HttpResponse(fd)
response['Content-Type'] = "text/plain"
response['Content -Disposition'] = "attachment; filename=%s" % filename
return response
...
When text file is downloaded from chromium-based browser, it is downloaded as autf-8 encoding text file.
How can I modify the web server(views.py) to download as an ANSI (CP949) encoded text file?
Best Regards