In zsh the date format for names isn't displayed properly

2

I don't know what's wrong or if I'm stupid or something, but I just can't get to display the date with words :(

I've been trying this for hours now..

It should display Mon, but it displays a "M" with weird signs.. Every date format that is numeric works fine. It just doesn't display names for days and months.

my locale is set like this:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

And this is inserted in RPROMPT for the display: %D{%a}

Oh I almost forgot - when I press alt-f4 to get to the console, it displays the date format properly.

mitja

Posted 2012-06-04T21:08:02.817

Reputation: 21

What do you see when you run the Unix date command? – Kyle Jones – 2012-06-04T21:31:51.607

Works for me. What is PS1 set to? What does echo "$COLUMNS" say? What about echo "$TERM"? What does print -P "%D{%a}" say? What terminal software are you using? – Paused until further notice. – 2012-06-04T23:00:58.713

Answers

0

The real question is: what does locale -a returns?

  • First determine which locales you have installed in your computer with locale -a
  • then set LANG LC_* accordingly.

Hint: In some systems you need to use en_US.utf8 instead of en_US.UTF8

Francisco

Posted 2012-06-04T21:08:02.817

Reputation: 1 250