Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
What do you see when you run the Unix date command? – Kyle Jones Jun 4 '12 at 21:31
    
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? – Dennis Williamson Jun 4 '12 at 23:00

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .