You are not logged in.

#1 2009-01-22 15:19:55

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

[SOLVED]get ncmpcpp to display music tags with latin characters

ok; so i have a few mp3 with non-standard characters "e" with an accent, "a" with a squiggly, that sort of thing (sorry i don't know the actual names of those characters).

in ncmpc the names are displayed as like "Axe" or the copyright symbol and ncmpc throws up an error about 'unable to convert to ANSCII something or other...'; they looked much the same as the filenames were displayed in xterm (until i changed them).

ncmpcpp just doesn't show those titles at all; though, the files still play just fine.

i figured since i got these files from a windows friend, it was just something lost in translation; the other day however, i noticed amarok displays the titles correctly; moreover, i got conky to display the title names correctly with the "override_utf_locale yes" option

i've been through the wiki about locales... a few times... here's some output

$ locale
LANG=en_US.UTF-8
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=C
$ locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8

i have this in my .bashrc:

export LC_ALL=C
export LANG=en_US.UTF-8

i did this because any other "export LC_ALL" settings make certain gtk apps complain about "error setting locale... defaulting to C"; conky complains too

in the updated mpd.conf i found these two settings:

#filesystem_charset              "UTF-8"
#id3v1_encoding                  "ISO-8859-1"

i've tried uncommenting as is and switching id3v1_encoding to UTF-8; neither fixes my ncmpcpp problem

would the mpd.conf settings help and what should i put in there

i'm english speaking in the US, is "LC_ALL=C" the correct export? if i use ISO... or UTF-8 which ISO, and is it quotes or no quotes in .bashrc?

the locale wiki wrote:

For example you can use the en_US.iso8859 locale, though there is no advantage of using it.

what does that mean?


any help much appreciated
pat

edit: bahh, typos...

Last edited by brisbin33 (2009-01-24 01:56:10)

Offline

#2 2009-01-22 18:44:13

Chrysalis
Member
Registered: 2008-07-07
Posts: 155

Re: [SOLVED]get ncmpcpp to display music tags with latin characters

Try without the export lines in bashrc, I am not sure what the purpose of those is with en_US. Xterm should have utf support but to be sure try uxterm or some other terminal.

Are the files on an ntfs partition by any chance? You have to mount it with a locale flag if so.

Offline

#3 2009-01-22 19:31:01

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED]get ncmpcpp to display music tags with latin characters

Chrysalis wrote:

Try without the export lines in bashrc, I am not sure what the purpose of those is with en_US. Xterm should have utf support but to be sure try uxterm or some other terminal.

Are the files on an ntfs partition by any chance? You have to mount it with a locale flag if so.

thanks for the reply; i remember now that xterm needs to be opened as uxterm or xterm -u8 but i hadn't done that at the time, i just noticed the actual filenames had odd characters so i used tab-completion to just rename them to conventional letter equivalents.

the files were copied _from_ an ntfs drive most likely, but they now reside on my ext3 partition.

i'll comment that LC_ALL line in .bashrc but i think i have to login/out for that to take affect right, there's no unexport command?

i do remember that i initially put in that LC_ALL=C export b/c w/o it, some programs would fail to open;

earlier today i changed to LC_ALL=en_US.utf8 and i didn't get any complaints starting any apps.  what did happen was ncmpcpp went from not displaying those affected track titles at all to displaying them incorrectly (bad characters and odd line-wrapping).

i think this may boil down to an id3v1 tag issue... it's pretty unimportant, just annoying

Offline

#4 2009-01-23 18:28:21

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED]get ncmpcpp to display music tags with latin characters

OK, so back to this Locale stuff...

my .bashrc is now:

#export LC_ALL=C
#export LC_ALL=en_US.utf8
export LANG=en_US.UTF-8

and my rc.conf has:

...
LOCALE="en_US.utf8"
...

so now immediately after boot i have...

> locale
LANG=en_US.UTF-8
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=C

and...

> echo $LOCALE

>

why?

Last edited by brisbin33 (2009-01-23 18:28:52)

Offline

#5 2009-01-23 19:34:17

unK
Member
Registered: 2008-11-16
Posts: 26

Re: [SOLVED]get ncmpcpp to display music tags with latin characters

There is no such env var like LOCALE, you have LANG, LC_ALL, etc.

Besides, if you have LC_ALL set to C, console programs won't display any non-ascii chars. Set it to en_US.UTF-8.

Offline

#6 2009-01-23 19:56:08

sokuban
Member
Registered: 2006-11-11
Posts: 412

Re: [SOLVED]get ncmpcpp to display music tags with latin characters

I have never used ncmpcpp, but last time I tried ncmpc (I can't check version since I don't have my Arche box) it had no unicode support. Try it with plain old mpc and see if you see the characters. If you don't, then it is a terminal problem, but if you do, it is ncmpc's problem. There is nothing much you can do about that.

Offline

#7 2009-01-23 20:24:56

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED]get ncmpcpp to display music tags with latin characters

got it.  now i understand the difference between C and UTF-8; i.e. UTF-8 is better.  i saw the LOCALE variable in rc.sysinit so i guess that got me confused, anyway...

i set LC_ALL to UTF-8 and that solved all my problems.  i didn't realize it at first b/c i'm sshed in through putty and theres an encoding setting on putty too.  if i set the translation encoding in putty to UTF-8 all the non-standard characters work fine...

now it just seems putty can't handle line drawing characters in any program (including ncmpcc) other than mutt... so that's a problem for another day

thanks for the help all.

EDIT: this one's [solved]; new putty specific thread here.  i don't think that's considered cross-posting; i apologize if it is.

Last edited by brisbin33 (2009-01-24 01:55:53)

Offline

Board footer

Powered by FluxBB