Kamis, Agustus 09, 2007

Karakter aneh di konsol

Bingung juga kan klo liat tampilan pstree seperti di bawah sini:



Karakter2 aneh itu seharusnya garis2 yang membentuk tree.

coba cari penjelasannya di inet, ternyata katanya karena kita pake charset yang nggak sama antara terminal emulator dan shell nya. Detailnya nggak ngerti :-p

On Tue, Aug 15, 2006 at 08:50:25PM +0800, Anthony Hawkes wrote:
> Anyone have any idea why manuals and for example pstree show the follow
> weird characters: ââ
>
> Heres a copy of the output of pstree:
> initââ¬âacpid
> ââapache2âââ10*[apache2]
> ââarchived.pl
> ââatd
> ââclamd
> ââcourierloggerâââauthdaemondâââ5*[authdaemond]
>
> Its hard to figure out where issues like this come from because a google
> search returns results for aa and not ââ
>
> Any help would be appreciated, cheers guys.

It sounds like your terminal emulator is running with LANG=C and your shell
is running with LANG=xx_XX.utf-8 or some other similar locale mixup.

i.e. The ââ characters are utf-8 codes for the line drawing symbols
interpreted as plain ASCII.

Try this to see it happening:

LANG=C xterm -e "LANG=en_US.utf-8 pstree; read"

To fix this, make sure that LANG is set the same for both shell and
terminal.

--
CJ van den Berg


Solusinya saya cuma ketik
$ LANG=C
dan semuanya seperti yang saya harapkan.



karena saya nggak ngerti mesti gimana baiknya, ya udah aku tambahin aja LANG=C di ~/.bashrc

pertama kali tak pikir masalah ncurses nya, eh ternyata bukan.
heu...

dodol ah.

Tidak ada komentar:

Pencarian

Google
 
The Ubuntu Counter Project - user number # 3998 Linux Registered User