You are not logged in.

#1 2018-03-03 21:34:26

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Missing unicode characters in xfce4 terminal [SOLVED]

I'm trying to run jmh: http://openjdk.java.net/projects/code-tools/jmh/

Everything runs fine, except I see a lot of question marks in the output:

Benchmark                                                              Mode  Cnt       Score     Error   Units
JMHSample_02_BenchmarkModes.measureAll                                thrpt    5      ? 10??            ops/us
JMHSample_02_BenchmarkModes.measureMultiple                           thrpt    5      ? 10??            ops/us
JMHSample_02_BenchmarkModes.measureThroughput                         thrpt    5       9.946 ?   0.014   ops/s
JMHSample_02_BenchmarkModes.measureAll                                 avgt    5  100271.192 ? 600.720   us/op
JMHSample_02_BenchmarkModes.measureAvgTime                             avgt    5  100336.224 ? 701.610   us/op

I have found this:

https://stackoverflow.com/questions/312 … -using-jmh

So I did some research/googling, I've tried installing fonts (ttf-freefont ttf-liberation ttf-droid), checked my locale configs, etc.

Went through this: https://wiki.archlinux.org/index.php/Lo … ide_locale

Even tried using: https://wiki.archlinux.org/index.php/Rxvt-unicode

No luck, still get question marks in the output, I just want that output to display properly using correct unicode characters?

$ locale

LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

$ localectl

   System Locale: n/a
       VC Keymap: n/a
      X11 Layout: n/a

$ uxterm

uxterm tried to use locale en_US.UTF-8 by setting $LANG

echo $? 
130
^ exit code for uxterm

Last edited by nikonmsn (2018-03-04 18:31:15)

Offline

#2 2018-03-03 22:03:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Your locale is broken. Rather than tell us you followed the wiki page, describe exactly what you did to set your locale.


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-03-03 22:28:03

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Re: Missing unicode characters in xfce4 terminal [SOLVED]

I've tried the following:

vi /etc/locale.conf
uncomment this line: un_US.UTF-8 UTF
$ locale-gen

Run this command:

$ localectl set-locale LANG=en_US.UTF-8

Run:

/etc/profile.d/locale.sh

Last edited by nikonmsn (2018-03-03 23:29:23)

Offline

#4 2018-03-03 22:38:02

loqs
Member
Registered: 2014-03-06
Posts: 18,964

Re: Missing unicode characters in xfce4 terminal [SOLVED]

The output of the following please

locale -a
cat /etc/locale.conf
grep -v '^#' /etc/locale.gen
printenv LANG

Please use code tags for commands and their output.

Offline

#5 2018-03-03 23:20:30

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Executed commands below and posted their output as requested. Please note that I've never messed around with setting different locales on this laptop. I initially setup en_US.UTF-8 as specified in setup wiki and never touched it.

$ locale -a
C
POSIX
en_US.utf8
$ cat /etc/locale.conf
LANG=en_US.UTF-8
$ grep -v '^#' /etc/locale.gen
en_US.UTF-8 UTF-8  
$ printenv LANG
C

Last edited by nikonmsn (2018-03-03 23:30:09)

Offline

#6 2018-03-03 23:28:50

loqs
Member
Registered: 2014-03-06
Posts: 18,964

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Did you try logging out and back in again or sourcing /etc/locale.conf as /etc/profile.d/locale.sh does not source /etc/locale.conf that is done by systemd?

Offline

#7 2018-03-03 23:34:48

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Tried logging out and back in, it did not make a difference

When I run

source /etc/locale.conf

The output changes from question marks as posted above to strange looking characters like so:

# Warmup Iteration   1:  10 ops/us

I don't know if that means we are getting closer to solving this?

Edit: looks like special chars got scrubbed by editor, they look like question marks inside a diamond...

Last edited by nikonmsn (2018-03-03 23:35:47)

Offline

#8 2018-03-03 23:39:07

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Re: Missing unicode characters in xfce4 terminal [SOLVED]

From SO:

MH output makes use of extended Unicode characters. In particular, ? 10?? s/op" probably means "≈ 10⁻¹⁰ s/op". Use a terminal that supports Unicode properly

Should i be using a different locale??

Last edited by nikonmsn (2018-03-03 23:39:27)

Offline

#9 2018-03-03 23:40:46

loqs
Member
Registered: 2014-03-06
Posts: 18,964

Re: Missing unicode characters in xfce4 terminal [SOLVED]

If the output of locale / printenv LANG is no longer C then it is no longer a locale issue but possibly a font issue.

Offline

#10 2018-03-03 23:55:31

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Re: Missing unicode characters in xfce4 terminal [SOLVED]

I did 2 things:

source /etc/locale.conf

Created /etc/vconsole.conf as follows:

$ cat /etc/vconsole.conf 
KEYMAP=pl
#FONT=lat2-16
FONT=Lat2-Terminus16
FONT_MAP=8859-2

Now when I start

uxterm &

and run my jmh suite the characters look correct, but uxterm is way uglier than the transparent xfce4 terminal :'(

If it's a font issue how do i fix that so that i can run in xfce4 terminal?

Last edited by nikonmsn (2018-03-03 23:57:18)

Offline

#11 2018-03-04 04:17:16

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Point of this query was to get correct characters display in output in xfce4 terminal, not uxterm, which seems like a cheap knock off in comparison from a usability perspective. I can't mark this thread as resolved until I figure this out, if it's a font issue, how do i select a different font, I tried messing around in Terminal > Set Encoding and Edit > Preferences > Advanced > Encoding

I just can't get it to work...

Offline

#12 2018-03-04 18:30:35

nikonmsn
Member
Registered: 2018-01-18
Posts: 18

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Marking this solved because I figured out how to get it working in uxterm and styling that, I can put that in an alias and get what i need, example:

xterm -fa 'Monospace' -fs 14

Checkout configs in /usr/share/X11/app-defaults/

Offline

#13 2022-09-07 15:36:34

ambient_armadillo
Member
Registered: 2022-09-07
Posts: 1

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Just experienced a similar issue. Certain special unicode characters were not displaying properly in xfce terminal, but properly in Konsole. My settings were off in xfce terminal, fixed it by doing the following:

- In xfce terminal > edit > preference
- Advanced > encoding > set to Default (UTF-8), was set to an ISO encoding.

Offline

#14 2022-09-07 16:16:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,263

Re: Missing unicode characters in xfce4 terminal [SOLVED]

Thanks for sharing, I'll take the opportunity and close this old thread.

Closing.

Offline

Board footer

Powered by FluxBB