Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I do some work on a Solaris 10 machine, and my .vimrc is set up to show unicode characters for tabs and line endings:

set listchars=tab:▸\ ,eol:¬

This works out of the box on my OS X machine. On Linux as well as Solaris I get the following error when I start vim:

Error detected while processing /home/lhanson/.vimrc:
line   17:
E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬

I solved this on my Linux box by setting LANG=en_US.utf8 ('locale -a' shows this as being an option).

On Solaris, however, 'locale -a' shows the following:

C
POSIX
iso_8859_1

Setting LANG to C or POSIX yields the same error, and even though iso_8859_1 probably wouldn't work it doesn't successfully change the locale anyway.

As a non-root user, is there any way I can have my unicode characters show up?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I managed to resolve my issue without touching the locales installed on the machine.

My "set listchars..." line came before another section of my .vimrc where I set up unicode options. Specifically:

if has("multi_byte")
  if &termencoding == ""
    let &termencoding = &encoding
  endif
  set encoding=utf-8
  setglobal fileencoding=utf-8 bomb
  set fileencodings=ucs-bom,utf-8,latin1
endif

That example (and more useful info) can be seen here: Working with Unicode.

By removing the section that set termencoding and moving my "set listchars" line below "set encoding=utf-8", I'm now able to see my unicode listchars.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.