Local PDF files can not be opened correctly in MS Edge when change default charset.
fz0000 opened this issue · 1 comments
Steps:
- Change default charset to UTF-8 (or any charset).
- Check "Allow access to file URLs" in extension options.
- Open a local PDF file (e.g.
D:\file-sample_150kB.pdf
)with MS Edge.
Expected:
The PDF file should opened correctly.
Actual:
Additional info:
This issue does NOT occur on online PDF files. (e.g. visit https://file-examples-com.github.io/uploads/2017/10/file-sample_150kB.pdf)
Environment:
Win10 x64
MS Edge 92.0.902.84
Hi, this may not be fixed. Because I cannot assume the file type by file extension name.
It may be an HTML file with .pdf
extension name.
Because a PDF file starts with ASCII characters: %PDF-
, it's hard to tell it is a PDF file or a pure text file with some special encoding, unless I read more bytes and try to guess if it is a valid PDF file.
So, you may need to assume file type yourself.
I am developing a new version to support "default charset for specified domain" (#24), so after then you can set to do not change the character set for the filename ending with .pdf
.