markdown-preview icon indicating copy to clipboard operation
markdown-preview copied to clipboard

Get garbled in non-UTF8 file

Open KSR-Yasuda opened this issue 2 years ago • 1 comments

It gets garbled on non-UTF8 files.

For example, the document below is written in charset EUC-JP.

Without MarkdownPreviewPlus, it is displayed in EUC-JP correctly.

With MarkdownPreviewPlus enabled, it styles the document in the file encode EUC-JP at first.

MarkdownPreview_20230310_164416

However, after a while, it wrongly changes charset to UTF-8.

MarkdownPreview_20230310_164423

Environment

  • Markdown Preview Plus v0.7.24
  • Chrome 111.0.5563.65 (Official Build) (64 bits) (cohort: 111_Win_64_Ramup)
  • Windows 10 Pro 22H2 (Version 10.0.19045.2604)

KSR-Yasuda avatar Mar 10 '23 08:03 KSR-Yasuda

The page doesn't send encoding in the response header. the header is

content-type: text/plain

e.g. it should contains the charset part

Content-Type: text/html; charset=utf-8

volca avatar Mar 13 '23 02:03 volca