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.
...
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?
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 - bytitlebar-font
. But in your case both of them areUbuntu
, 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.
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 linesudo 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.