Special characters not displaying correctly - Serbian Cyrillic and Firefox

Hi,

I have a problem:

There are a couple of special characters in Serbian Cyrillic, that do not display correctly in Firefox on openSUSE. Anytime characters such as: ђ, љ, њ etc. appear, theres a т instead of them.

However, as far as I can see, this problem only occurs on Facebook and Twitter. Other Serbian sites display these characters correctly. I have translations-other installed, even tried playing around with character encoding in Firefox, but that did not work. Any idea where I could look next?

Thanks!

I see all the character in your post above correct. That is they are all different from the T shaped one you post there as last.

Thus I assume they are correct encoded in UTF-8 and all the pages of the forums here are charset=UTF-8.

Did you check on those pages where they are wrong what those pages advertize as their character encoding? In Firefox: Extra > Page Info (or Ctrl-I)?

Have you solved this problem in the end? I have been having the same issue and it’s going on my nerves a bit. I could switch and use Firefox for work and Chrome for personal stuff instead of the other way around, but that just seems wrong after years of having this setup.

Couple of offending pages that I checked list UTF-8.

He seems to be one of those that ask for help and then, after people take the trouble to spend time on their problem, never answer back >:)

As we here do not know what the consequences are of you being “for work” or “for personal stuff”, you better explain in technical terms what works on which browser.
So, is it OK on Firefox (as it is here on my system) and wrong on Chrome (which I do not use, thus I can not follow you there), or the other way around?

That would point then to the browser, like the fact that one browser can do it and the other not.

  • I use Chrome for work. Chrome does not have any problems displaying Serbian Cyrillic, it works perfectly. On top of that, my work does not involve Serbian language and I never have the need to visit the offending sites and pages. Everything’s perfect here.
  • However, Firefox is always open on the side, and is used exclusively for personal, non-work, activities. These activities sometimes take me to Serbian websites, where certain letters (see OP post) are not displayed correctly. Firefox DOES have this problem.

So, I could solve this problem easily, by using Chrome for fun and Firefox for work, as in that case I would never see this issue. It is a simple solution that would require about five minutes of work. But, I would have to change a habit, you know, and I would rather solve the problem, if possible. Which is not really a problem, more of an annoyance.

So, yes, it’s a browser-related problem.

Hi wavelike,

In Firefox, did you try to uncheck “Allow pages to choose their own fonts, instead of your selections above”?

(Preferences > General > Fonts & Colors > Advanced)

Does that have any effect?

Also, could you please add a Twitter-url that uses those characters and shows them wrongly?

Kind regards,

Leen

I’m on LEAP 42.3 and I can both read and write cyrilic characters for example љњпшѓќ
afaik the default Firefox font (Roboto) has full cyrilic support
did you maybe change the default font used by Firefox, do you have the Roboto font installed ( it’s packaged in google-roboto-fonts)

zypper se -si google-roboto-fonts

if you don’t have it installed install it

zypper in google-roboto-fonts

I am using Firefox 57 if you’re on 52 esr the default font might be different you can try installing google-roboto-fonts and setting roboto as the default font in Firefox from
hamburger bar->Preferences->Language and Appearance->Fonts and Colors

Hi leen_meyer,

That, actually, did the trick. I checked only one of the problematic pages, but that one works fine now.

On the other hand, I am not sure if forcing all pages to use the fonts specified in my browser is something I would like to do all the time. But, this is a solution, even if temporary. Thanks a lot! :slight_smile:

I don’t have Twitter - it’s OP who mentioned Twitter and Facebook. This is a bicycle forum that I visit regularly, and some people there prefer Cyrillic over Latin (Serbian language can use either), which is when problems arise. Here’s the link to a post that shows this issue
http://www.2bike.rs/forum/topic/10780-gračišće-i-još-ponešto/?p=228177The first sentence is
“Никад нема планова док се не зна да ли ће бити буџета”.
The bold letter is my formatting, but it shows you the first problematic character. With that font option in Firefox checked, the sentence looks like this:
“Никад нема планова док се не зна да ли те бити буџета”. (I had to change the character as the incorrectly displayed character is corrected when copy/pasted into this editor)
Then, second sentence, after smiley, there is the word “жеља” which is incorrectly displayed as “жела”… and so on.

Hi I_A,

I do have google-roboto-fonts installed. I am running 42.3 Leap and 52.5.3 Firefox. Thanks :slight_smile:

I forgot to add that I did not make any changes in Firefox font settings.

Sorry I couldn’t edit my previous post to add this, it was too late.

it could be a faulty font package within 42.2 as only a few glyphs are involved my suggestion would be to change the default font what ever it is to something different just to test this hypothesis
afaik the DejaVu fonts have full cyrilic support set one of them as the default restart Firefox and see if the issue is still there if it’s the default font (I’m guessing it’s roboto) you should open a bug report so it gets fixed

Hi wavelike,

Which would mean you have Helvetica or Arial installed? (below more about this)

On the other hand, I am not sure if forcing all pages to use the fonts specified in my browser is something I would like to do all the time. But, this is a solution, even if temporary. Thanks a lot! :slight_smile:

“forcing all pages”? No, not realy. I was thinking of Stylish or Stylus, two Firefox-add-ons to tweak the font via css per site.

I don’t have Twitter - it’s OP who mentioned Twitter and Facebook. This is a bicycle forum that I visit regularly, and some people there prefer Cyrillic over Latin (Serbian language can use either), which is when problems arise. Here’s the link to a post that shows this issue
http://www.2bike.rs/forum/topic/10780-gračišće-i-još-ponešto/?p=228177The first sentence is
“Никад нема планова док се не зна да ли ће бити буџета”.

That is exactly what I have (either with or without javascript enabled).

The font for that paragraph indicated by css is: “helvetica,arial,sans-serif”. Do you have Helvetica or Arial installed?

(I had to change the character as the incorrectly displayed character is corrected when copy/pasted into this editor)

Not “corrected”, but “correctly shown”,:wink: caused by a different font. The text itself was not changed.

Then, second sentence, after smiley, there is the word “жеља” which is incorrectly displayed as “жела”… and so on.

е" and “жеља” are correctly shown in my Firefox (using DejaVu Sans, as I have nor Helvetica nor Arial installed).

Do/did the default fonts of your Chrome and your Firefox differ?

With kcharselect I discovered that Nimbus Sans L shows “ћ” and “љ” both incorrect just like you describe.

BTW, UTF-8 support is why I use the DejaVu fonts everywhere (I take the far too subtle distinction between I (capital i) and l (lower-case L) in DejaVu Sans for granted - only 2 dots difference on 96 dpi).

You also might want to look on https://fontinfo.opensuse.org/ for the UTF-8 coverage of other fonts.

Kind regards,

Leen

are you sure that that’s not a spell error I’m not sure where **ћ **and т are on a serbian cyrilic key layout but as ћ renders it is possible that the auther of that post just made a mistake and yes I see a t instead of ћ on Firefox 57 on LEAP 42.3 too

this is indeed a strange issue as I see т instead of **ћ **in both Firefox 57.0.3 and Basilisk on LEAP 42.3 but I see ћ in Firefox 57.0.3 on windows as Basilisk uses Serif instead of Roboto as the default font I have no idea what’s the cause of this (I doubt it’s a broken Roboto) it really shuldn’t be OS dependent but it seams it is?
can someone that has a different distribution installed confirm this behavior (even TW) or is it LEAP only as it happens on Basilisks too (it’s a rolling Firefox 55 fork) I doubt it’s opensuse’s Firefox build

leen_meyer & I_A:
I will go over your posts again later, waaay too much work here so I won’t have any time probably before Saturday. But thanks for helping! :slight_smile:

@wavelike:

Oh, boy… I went flat on my face because I did not enable the checkbox “Allow pages to choose their own fonts”. Now, ashamed, I have to admit I got the same results as you.

I could not reproduce your problem with Konqueror, Chromium or Vivaldi.

What really happened with Firefox is that helvetica, since that is not installed on my system, got replaced with Nimbus Sans L by fontconfig.

The file /usr/share/fontconfig/conf.avail/30-metric-aliases.conf contains the following fragment:

<alias binding="same">
  <family>Helvetica</family>
  <accept>
  <family>TeX Gyre Heros</family>
  <family>Nimbus Sans L</family>
  </accept>
</alias>

After I commented out the Nimbus Sans L font in that fragment (), ran /usr/sbin/fonts-config, and restarted Firefox, the problem went away, and came back after I undid that change.

A better solution is this:

  1. Put the next fragment in /etc/fonts/local/conf (between the fontconfig-tags, or in ~/.config/fontconfig/fonts.conf (without fontfonfig-tags):
<match target="pattern">
    <test name="family">
        <string>Nimbus Sans L</string>
    </test>
    <edit name="family" mode="assign">
        <string>DejaVu Sans</string>
    </edit>
</match>

The fragment causes Nimbus Sans L to be replaced with DejaVu Sans. Instead of DejaVu Sans, one might choose another font, e.g. Liberation Sans.

  1. Run, as root,
/usr/sbin/fonts-config
  1. Restart your browser.

(I tested both solutions, with and without)

Kind regards,

Leen

this should be reported (inc the fix) to opensuse’s bug tracker so a proper fix is pushed to all users
https://bugzilla.opensuse.org/