You are not logged in.

#1 2012-06-16 08:07:16

Laputa
Member
Registered: 2012-06-16
Posts: 5

[Solved]unreadable characters from tty console output

Here's the picture i grab from tty1 (ctrl+alt+f1). It's the output of alsamixer.


http://forum.ubuntu.org.cn/download/fil … %A2%98.jpg

The tty couldn't display box-drawing characters well.

My PS1 is

PS1='\n\e[0;36m┌─[\e[1;35m\u\e[1;34m @ \e[1;35m\h\e[0;36m]─[\e[1;34m\A\e[0;36m]─[\e[1;34m\w\e[0;36m]─[\e[0;31m\!\e[0;36m]\n\e[0;36m└─[\e[1;37m\$\e[0;36m] \e[0m'

the tty also couldn't show characters like  ┌ ─ correctly !

My locale is en_US. UTF-8

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

everything works well few days ago, and after an upgrade the tty just couldn't show characters correctly.

Anyone could help me on this ?

Last edited by Laputa (2012-06-16 18:13:24)

Offline

#2 2012-06-16 08:09:38

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

Re: [Solved]unreadable characters from tty console output

Please read the Forum Etiquette on posting images: https://wiki.archlinux.org/index.php/Fo … s_and_Code


...and, once you have done that, search the boards: there are at least two solved threads with this same issue in the last 10 days.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-06-16 08:16:04

Laputa
Member
Registered: 2012-06-16
Posts: 5

Re: [Solved]unreadable characters from tty console output

sorry, im new here.

i just dont know how to search related problems.

I mean which key word should i use to search for this problem ?

or could you kindly find me a post about this ?

thanks !

Last edited by Laputa (2012-06-16 08:16:32)

Offline

#4 2012-06-16 08:24:42

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

Re: [Solved]unreadable characters from tty console output

I'm sure that if you find the inconvenience of garbled characters in your TTY sufficiently annoying, you will be motivated to search for the correct terms, rather than expecting someone else to do it for you...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2012-06-16 08:45:08

Laputa
Member
Registered: 2012-06-16
Posts: 5

Re: [Solved]unreadable characters from tty console output

solution:

add this to /etc/rc.conf

DAEMON_LOCALE="yes"

thanks! jason

i should check pacnew files more frequently !

Last edited by Laputa (2012-06-16 08:45:31)

Offline

#6 2012-06-16 08:59:29

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

Re: [Solved]unreadable characters from tty console output

Please remember to mark this thread as [Solved]...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2012-06-18 02:13:11

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [Solved]unreadable characters from tty console output

jasonwryan wrote:

I'm sure that if you find the inconvenience of garbled characters in your TTY sufficiently annoying, you will be motivated to search for the correct terms, rather than expecting someone else to do it for you...

I am sorry to intervene in the SOLVED thread and mean no offense, but I find this statement quite misleading.

First you could have provided at least one link (like https://bbs.archlinux.org/viewtopic.php?pid=1115104) so that people can actually solve the prolem as opposed to wasting time on polishing google(tm) skills.

Second, you could have read the OP. Quote "the tty also couldn't show characters like  ┌ ─ correctly !". While there are many threads regarding this indeed, none of them addresses the problem. All "brilliant" solutions were to change "DAEMON_LOCALE" to "yes" (if set to "no", C locale is used). Meanwhile, before the update things worked either way.

So here is the situation:
1. Run pstree -U, pstree, findmnt in tty (TERM=linux)
    Observe garbage instead of line drawing characters (LDCs).
2. LANG=C pstree or LANG=en_US pstree in the same tty
    Observe normal LDCs.
3. LOCALE is empty in rc.conf (C-locale for everything)
    Same result as (2).

A question follows: why with DEAMON_LOCALE="no" are the unicode LDCs broken, but things work correctly with LANG=C or when C locale is used explicitly?

EDIT: glibc is not to blame here

Last edited by Leonid.I (2012-06-18 16:33:08)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#8 2012-06-18 06:51:43

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

Re: [Solved]unreadable characters from tty console output

Leonid.I wrote:
jasonwryan wrote:

I'm sure that if you find the inconvenience of garbled characters in your TTY sufficiently annoying, you will be motivated to search for the correct terms, rather than expecting someone else to do it for you...

I am sorry to intervene in the SOLVED thread and mean no offense, but I find this statement quite misleading.

First you could have provided at least one link (like https://bbs.archlinux.org/viewtopic.php?pid=1115104) so that people can actually solve the prolem as opposed to wasting time on polishing google(tm) skills.

Providing a link would have been spoonfeeding. As it was, I gave the OP everything they needed to solve their issue (except the initiative to do it, which in this case they supplied themselves).

Leonid.I wrote:

Second, you could have read the OP.

How did I provide the answer to OP's issue without having read the post?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2012-06-18 16:32:27

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [Solved]unreadable characters from tty console output

But as I said, changing DAEMON_LOCALE, as suggested in those numerous threads, is not an answer but a silly workaround (I don't understand why it even works or why people accept it so happily, but in a debuggable setup DAEMON_LOCALE should be set to "no" because "yes" localizes system messages). Therefore, marking everything as SOLVED is premature. The real solution is discussed in https://bugs.archlinux.org/task/30228.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB