2

I'm using Ubuntu 15.10 which uses Files v3.14.2 as file manager. This app cannot show Persian characters in folder name on its title bar. Other apps (VLC ...) have no problem in similar cases.

Files does not show the Unicode text properly

...

VLC shows the Unicode text properly while Files doesn't

What would be the reason behind this? Is it a bug?


THE SOLUTION:

I ran locale -a command which gave me this output:

C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX

As it is visible, there is no Persian/Farsi locale installed on my system. So Ubuntu could not mange to show it properly.

I went to System Setting > Language Support and activated Persian from the list. After rebooting the laptop, the problem was solved. Now in the output of locale -a command, I see two more lines:

fa_IR
fa_IR.utf8

Yet the question remains if the problem occurred because Persian language was not activated. If yes, why was I not able to see the Persian titles only in the Gnome Files and only when it was not maximized.

Does that mean it is a bug?

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
  • I checked the same folder in Ubuntu booted from USB. Titlebar could show the text properly – Mostafa Ahangarha Feb 25 '16 at 06:26
  • 1
    Can you check the output of the command locale -a on your system and compare it with the output of the same command while booted from USB? The order of locales may change, but I'm interested in the differences (if any). Also interesting enough, but your GNOME Files displays the same folder name correctly on the breadcrumb element, below the titlebar, right? What is the output of the command gsettings get org.gnome.desktop.wm.preferences titlebar-font ? – whtyger Feb 29 '16 at 11:21
  • Your comment guided me towards solving the problem. I did what you asked and interestingly, I was not able to see Farsi/Persian in the list. So, I went to setting and added Farsi. After rebooting my laptop, the problem is solved. thank you for that. == Please add this as answer so I send you the bounty – Mostafa Ahangarha Feb 29 '16 at 18:00
  • 1
    You are welcome. I also fixed your topic title as it sounded unclear. Actually, these GNOME guys shouldn't rename Nautilus into Files. This decision makes problem solving much more sophisticated - "Nautilus" was unique, and "Files" would produce much false positives while using search engines. – whtyger Mar 01 '16 at 07:36

2 Answers2

1

From the first glance this can be a font issue or a locale issue.

When I enlarged your first screenshot I noticed that all missing symbols have the same code in them - U+FFFD. This code belongs to Unicode replacement character, which is used to replace an incoming character whose value is unknown or unrepresentable in Unicode (this info is taken from the Character Map). If your issue was font-related, then the missing symbols would have the different codes. That's why the locale issue is more probable cause.

You mentioned that the same folder name was displayed correctly when you booted the system from USB. Comparing locale settings in both systems using locale -a can point out the missing locale(s). In your case it was Farsi/Persian (fa_IR) locale which was absent in the system and adding it fixed this issue.

When you maximize Gnome Files' window, its titlebar text is placed on the top panel. No wonder that it is displayed correctly, because top panel uses the same font as a breadcrumbs element (that's the trail 851 GB Volume > Downloads > ... on your screenshot) which also displayed your folder name properly. This font is defined by the setting font-setting, which affects all Desktop Interface elements. Titlebars font is defined by another setting - by titlebar-font. But in your case both of them are Ubuntu, so my idea about some broken font substitution was wrong, as Ubuntu font contains all symbols of Arabic alphabet.

I also thought that maybe additional symbols of Persian alphabet are missing, but Arabic symbols are shown properly. But it also proved invalid, as some Arabic symbols are also broken. Moreover some Arabic symbols are always shown, but some are always missing.

whtyger
  • 5,810
  • 3
  • 33
  • 46
  • Thank you. By the way, how Ubuntu could manage to show the title perfectly in other apps but not in Gnome Files? Even Gnome Files could show the title properly when it was maximized. This should be a bug? Don't you think so? – Mostafa Ahangarha Mar 01 '16 at 08:19
  • Your DE is Unity, right? What's the output of the command, which I gave in my comment to the original post: gsettings get org.gnome.desktop.wm.preferences titlebar-font? – whtyger Mar 01 '16 at 09:32
  • 'Ubuntu Bold 11' – Mostafa Ahangarha Mar 01 '16 at 10:11
  • And one more font, please: gsettings list-recursively | grep ' font-name '. In my system it is located in org.gnome.desktop.interface schema, but in yours it may be elsewhere. Not document-font-name, not monospace-font-name or unity-greeter, just plain font-name. Then I'll explain my idea. – whtyger Mar 01 '16 at 12:44
  • org.gnome.desktop.interface font-name 'Ubuntu 11'
    com.canonical.unity-greeter font-name 'Ubuntu 11'
    – Mostafa Ahangarha Mar 02 '16 at 07:17
  • 1
    I updated my answer with some more info. Thanks for the interesting question! – whtyger Mar 02 '16 at 08:34
  • Tnx. I submitted the issue – Mostafa Ahangarha Mar 02 '16 at 12:02
  • 1
    As removing your locale haven't caused the reappearance of the issue, I suppose I was wrong about the connection of this issue with GNOME Files. I corrected my answer. FYI Here's the similar issue, also with U+FFFD symbols, which are displayed only on titlebars of non-maximized windows. Maybe you'll find it useful. – whtyger Mar 09 '16 at 11:48
0

The font being used in the titlebar is missing some of the characters, so they are being shown as boxes.

To fix it, I would change the font. Install unity-tweak-tool via the software center or command line

sudo apt-get install unity-tweak-tool

Then run it, under Appearance choose Fonts. Window title font is the one that is missing characters. Finding one with the characters you need will require trying different options. You could start with setting it the same as the Default or Document font.

  • Thank you for answering. but I think you did read the question properly. As I said, other apps show the characters properly. See the update (new screenshot) in the question – Mostafa Ahangarha Feb 24 '16 at 16:32