Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Some local plaintext files in latin encoding rendered with japanese font settings

  • Không có trả lời
  • 0 gặp vấn đề này
  • 47 lượt xem
more options

A certain set of plaintext files are rendered in a weird way when opened in Firefox.

Some plaintext files are rendered "MS Gothic", which is the default monospace font for plaintext files in Japanese encoding. (Also, if I change font.name-list.monospace.ja to "monospace", the font changes).

However, the files are not in Japanese encoding, they do not contain a single character in Japanese encoding. Since the files are local, they have no HTTP headers to determine the encoding, so Firefox must have guessed the encoding somehow. How can I stop firefox from detecting those files as Japanese while they are not?

Also, I noticed that this issue happens only with long files. The shorter a file, the less likely it is that Firefox renders the file as if it had Japanese encoding.

Since I cannot reproduce the issue with smaller files and the files contain confidential information, I am unable to provide a minimal reproducer.

As a workaround, I could change font.name-list.monospace.ja, but this would change (potentially break) rendering of Japanese websites.

I'm using Firefox 124.0.1 on Windows 10, although this issue has been present for at least some months (at least 4 firefox releases).

The screenshot shows an excerpt where the text "C:\Temp\2024-" is partially rendered with Japanese glyphs and fully rendered with "MS Gothic" font which is hard to read with ASCII characters.

PS: I [censored] some of the information in the "Troubleshooting Information" field below.

A certain set of plaintext files are rendered in a weird way when opened in Firefox. Some plaintext files are rendered "MS Gothic", which is the default monospace font for plaintext files in Japanese encoding. (Also, if I change font.name-list.monospace.ja to "monospace", the font changes). However, the files are not in Japanese encoding, they do not contain a single character in Japanese encoding. Since the files are local, they have no HTTP headers to determine the encoding, so Firefox must have guessed the encoding somehow. How can I stop firefox from detecting those files as Japanese while they are not? Also, I noticed that this issue happens only with long files. The shorter a file, the less likely it is that Firefox renders the file as if it had Japanese encoding. Since I cannot reproduce the issue with smaller files and the files contain confidential information, I am unable to provide a minimal reproducer. As a workaround, I could change font.name-list.monospace.ja, but this would change (potentially break) rendering of Japanese websites. I'm using Firefox 124.0.1 on Windows 10, although this issue has been present for at least some months (at least 4 firefox releases). The screenshot shows an excerpt where the text "C:\Temp\2024-" is partially rendered with Japanese glyphs and fully rendered with "MS Gothic" font which is hard to read with ASCII characters. PS: I [censored] some of the information in the "Troubleshooting Information" field below.
Đính kèm ảnh chụp màn hình

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.