The officially official Devuan Forum!

You are not logged in.

#1 2023-12-31 01:23:16

Ron
Member
Registered: 2018-04-22
Posts: 526  

[SOLVED] How to fix unicode text, it's showing as a box

Since installing Devuan 5 (Crowz) I'm getting these strange text boxes. Image below so you can see what I'm talking about. Doing research I found out this is a unicode character. How do I get unicode characters to correctly show? This is in the file manager, and I also once seen boxes like this in my browser.

ft-issue.jpg

Last edited by Ron (2023-12-31 01:57:20)

Offline

#2 2023-12-31 02:25:59

ab
Member
Registered: 2023-07-19
Posts: 6  

Re: [SOLVED] How to fix unicode text, it's showing as a box

You have to install fonts that support that needed character.  Whatever it may be.  Could so be an emoji.

The Nerd fonts are popular for emojis and icons.  You may need special language fonts for special characters and the like.  In essence, which ones, it's hard to say.  I'm not sure there is a good way.

A web search for "unicode FF5C" indicates it's a fullwidth vertical line in a common math equations.

Good luck.

Offline

#3 2023-12-31 02:35:14

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Yeah, I already tried installing fonts-noto-core but that didn't fix it.

Offline

#4 2023-12-31 15:14:08

Nietz
Member
Registered: 2023-12-16
Posts: 13  

Re: [SOLVED] How to fix unicode text, it's showing as a box

hi @Ron

could you please elaborate which programs you are experiencing these characters in?

Also what is the output of the terminal command

echo $LANG

Thank you

Offline

#5 2023-12-31 19:33:35

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

I notice it in my file manager (caja) when a file name contains a unicode character. That's the screenshot I put in my first post. I also noticed it once browsing the web, I think; I may be mistaken on this though. The output of echo $LANG is en_US.UTF-8

Offline

#6 2024-01-01 14:18:38

alexkemp
Member
Registered: 2018-05-14
Posts: 357  

Re: [SOLVED] How to fix unicode text, it's showing as a box

As you have discovered, it is blooming hard to be able to identify the precise reason for your kind of problem. The reason for that is the web of inter-connecting processes & config files that can lead to a problem.

Even fixing locale problems can be a nightmare. To get a fuller picture of that, look at this Debian Wiki page on Locales. Here's my default locale ($LANG) + all available locales (locale -a in my system):

$ echo $LANG
en_GB.UTF-8
$ locale -a
C
C.utf8
en_GB.utf8
POSIX

The classic situation for your issue is that someone has a C-locale but is trying to print/show non-ASCII characters. However, you appear to have a suitable locale (en_US.UTF-8), but is your file manager (caja) using a utf8 font for display characters? This forum thread suggests that the font is chosen by your DM in a similar manner to Thunar.

We now know your FM (caja) but have zero idea of your DM.

I use XFCE 4.18 as my DM (it describes itself as a "Desktop Environment") and Thunar as the FM. Changing the font is made via menu:Settings | Appearance. At "Style" I discover that all of the XFCE settings are in GTK3 (which gives yet another place where fonts may be set)). The fonts tab allows both the default font + the size to be changed (menu:Settings | File Manager Settings does not have any font settings available, and neither does menu:Settings | Settings Editor | thunar).

So, I cannot give a definitive answer, but hopefully the info given gets you one step closer to a solution.

Offline

#7 2024-01-01 17:30:05

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Mate is my DE, and what you describe is found in Control Center >> Appearance >> Fonts tab, and the "Application Font" setting (I already knew that). I tested every font on my system just now (a tedious task), and not one of them got rid of that box.

The thing is I had this file when I was on Devuan 4 (a Miyo install, but added Mate, just like I did for Devuan 5, a Crowz install, but added Mate) and there it displayed correctly. Also, I have a list (a long one) of every file/app to install that applies to Mate, so, besides being on a different version of Mate (1.26 vs. 1.24) everything else is the same as far as Mate is concerned. That leads me to believe that something is different in the OS install, and that this is "probably" not a Mate issue. Then again, I'm not an expert, so anything I think is just a educated guess.

EDIT

Okay, I just thought of something that is different. Miyo did not install with a word processor, so I had added LibreOffice. Crowz installs with AbiWord, so I didn't bother to install LO. I think (but I'm not sure) an install of LO also pulls in a ton of fonts. I wonder if I install LO if that would solve this. I really don't want to, as LO is bloatware compared to AbiWord. Do you think it's worth a shot? Or am I off base here?

Last edited by Ron (2024-01-01 17:44:31)

Offline

#8 2024-01-01 18:25:35

golinux
Administrator
Registered: 2016-11-25
Posts: 3,316  

Re: [SOLVED] How to fix unicode text, it's showing as a box

You can install LibreOffice Writer without installing all of LibreOffice. Cuts down on the bloat . . .

Offline

#9 2024-01-01 19:29:02

rolfie
Member
Registered: 2017-11-25
Posts: 1,171  

Re: [SOLVED] How to fix unicode text, it's showing as a box

A different thought: maybe Crowz removes some fonds? Just finished a bare metal Daedalus installation with Mate in a VM. So far just Mate DE, no applications, fonts available are:

  • Bitstream Charter

  • Cantarell

  • Courier 10 Pitch

  • DejaVu Sans

  • DejaVu Serif

Got all of them?

The default font is Cantarell.

Last edited by rolfie (2024-01-01 19:32:00)

Online

#10 2024-01-01 20:19:47

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

I've got Cantarell, I'm missing all the rest.

EDIT
Just added the DejaVu fonts. None of them fix the issue.

Last edited by Ron (2024-01-01 20:25:37)

Offline

#11 2024-01-01 20:29:03

rolfie
Member
Registered: 2017-11-25
Posts: 1,171  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Try a

 dpkg-reconfigure locales 

as root.

Online

#12 2024-01-01 20:40:03

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Do I select "All locales"?

Offline

#13 2024-01-02 13:11:59

stopAI
Member
Registered: 2023-04-04
Posts: 186  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Hello.

Download Ubuntu Nerd Font and UbuntuMono Nerd Font from here:

https://www.nerdfonts.com/font-downloads

Extract it.

Put files to

~/.local/share/fonts/

Instruct your program to use these fronts.

Logout and login again.

Offline

#14 2024-01-02 14:43:39

rolfie
Member
Registered: 2017-11-25
Posts: 1,171  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Ron wrote:

Do I select "All locales"?

You could but that would generate all locales on your PC which I guess you will not want. Just select the one(s) that are relevant for you. en_GB.utf8 or en_US.utf8? Or both?

Online

#15 2024-01-02 16:04:17

quickfur
Member
Registered: 2023-12-14
Posts: 431  

Re: [SOLVED] How to fix unicode text, it's showing as a box

You could also try `apt install fonts-noto`. Noto is a font that tries to provide a basic level of glyphs for as many Unicode characters as possible, so that they won't show up as boxes. The glyphs may not be the best, but at least you'll see something instead of just a box.

Offline

#16 2024-01-02 21:51:41

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Just tried dpkg-reconfigure locales. That didn't fix it. I also already tried fonts-noto-core and also fonts-freefont-ttf, fonts-opensymbol, fonts-dejavu-extra, and fonts-arkpandora. None of these worked.

Last edited by Ron (2024-01-02 21:52:06)

Offline

#17 2024-01-02 22:30:02

quickfur
Member
Registered: 2023-12-14
Posts: 431  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Note that after installing new fonts they may not get picked up immediately. You may need to log out and log in again, or restart your display server, before the new fonts will get picked up. Maybe try that?

If that still doesn't work, it might be a problem with font configuration, i.e., the fonts are installed but the application for whatever reason is defaulting to an old font that doesn't have the needed characters.

Offline

#18 2024-01-03 00:00:27

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

stopAI wrote:

Download Ubuntu Nerd Font and UbuntuMono Nerd Font from here:

Tried these fonts (I like them) but it's not fixing the box. I know the system is picking it up because I noticed the difference. I'm ready to give up. But thanks for the nice fonts.

Offline

#19 2024-01-03 00:07:54

quickfur
Member
Registered: 2023-12-14
Posts: 431  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Do you know exactly what those offending characters are?  Any chance you could copy-n-paste them here somehow?  Just wondering if they are some obscure characters that most fonts wouldn't have.

Last edited by quickfur (2024-01-03 00:08:08)

Offline

#20 2024-01-03 00:27:27

Ron
Member
Registered: 2018-04-22
Posts: 526  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Here you go:  |

https://unicodeplus.com/U+FF5C

Offline

#21 2024-01-03 02:03:26

quickfur
Member
Registered: 2023-12-14
Posts: 431  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Interesting, on my browser it's showing up as rendered from a Chinese font (fonts-wqy-zenhei). This is unlikely to be the only font that contains this character, so installing this font may or may not solve your problem. But it's worth a shot...?

Otherwise you might want to check if fontconfig and fontconfig-config are properly installed. Maybe try force-reinstalling fontconfig and fontconfig-config?  If that still doesn't work, then I'm out of ideas. hmm

Offline

#22 2024-01-03 12:37:55

alexkemp
Member
Registered: 2018-05-14
Posts: 357  

Re: [SOLVED] How to fix unicode text, it's showing as a box

quickfur wrote:

Interesting, on my browser it's showing up as rendered from a Chinese font (fonts-wqy-zenhei)./

Further down the page, under "Preview", it is shown rendered under Times New Roman, Arial & Courier New. No problems with any of that on my system.

Offline

#23 2024-01-03 15:44:22

quickfur
Member
Registered: 2023-12-14
Posts: 431  

Re: [SOLVED] How to fix unicode text, it's showing as a box

Yeah, I suspect it's a problem with the OP's font configuration, or something isn't properly installed that's causing it to revert to fonts that don't contain the required characters.

Offline

#24 2024-01-03 15:50:26

JWM-Kit
Member
Registered: 2020-06-29
Posts: 139  
Website

Re: [SOLVED] How to fix unicode text, it's showing as a box

Don't know if it will help, but have you tried updating the font cache

fc-cache -fv

Offline

#25 2024-01-03 17:09:54

stopAI
Member
Registered: 2023-04-04
Posts: 186  

Re: [SOLVED] How to fix unicode text, it's showing as a box

quickfur wrote:

Yeah, I suspect it's a problem with the OP's font configuration, or something isn't properly installed that's causing it to revert to fonts that don't contain the required characters.

Maybe you should ask the Devuan 5 (Crowz) developer?

Offline

Board footer