Mocha test output fonts missing?

I am running my Mocha unit tests like below (with output)

[jiewmeng@JM Tickle]$ cake test-ui
path.existsSync is now called `fs.existsSync`.


  hello
    ��� should pass 
    ��� should pass 2 

  Home page
    ��� should have a title of Express (72ms)


  ��� 3 tests complete (77ms)

As you can see (hopefully), I am having "?" instead of ticks/crosses I'd expect? I think I am missing some fonts? Which are they? I am on Arch Linux

UPDATE

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

Font is DejaVu Sans Mono Book

A likely issue is that your encoding is not utf-8.

Try running locale in your terminal. If you support utf-8, you should see something similar to:

[ ~ ]
➜ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
[ ~ ]
➜ 

(I'm on OSX so my output may have more or less variables; the important thing to note is the en_US.UTF-8 values).

If not, you may want to try uncommenting (or adding) a line in your config:

export LANG=en_US.UTF-8

Depending on your system, the appropriate config file might be one of:

  • /etc/rc.conf # <= Arch Linux
  • /etc/environment
  • /etc/profile.d/lang.sh

That will change the encoding for all users, but you could theoretically also just make the change for your user by adding the line to one of:

  • ~/.pam_environment
  • ~/.profile

I may be able to provide more information knowing your system (os, version, etc).

You may also want to see: http://unix.stackexchange.com/questions/22435/how-to-fix-character-encoding-in-bash-arch-linux

To find out which encoding your terminal uses you could have a look into /usr/share/xsessions/06xfce4.desktop (Source: XFCE faq).

Looking into the mocha source it seems it is not a font issue as they just set the character as an UTF-8 char itself. Also the source just indicates that whenever they set a font they use something similar to 'helvetica, arial, sans-serif', which could default to a font, not supporting the character, on your system. (Source: find . -iname "*.*" -exec grep -Hn "font" {} \; on source code - also they seem to use font: 12px monaco, monospace; in css, but as far as I read this doesn't have anything to do with the console output.)

Try to find out which font your terminal uses or to which 'helvetica, arial, sans-serif' defaults on your system. (Probably the easiest way to check is by using css.)

FYI: The x symbol they seem to use:

✖
HEAVY MULTIPLICATION X
Unicode: U+2716, UTF-8: E2 9C 96