Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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

  • Nema odgovora
  • 0 ima ovaj problem
  • 47 views
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.
Priloženi snimci ekrana

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.