vim, utf-8 and urxvt

Hello everyone, could somebody clarify me wich is the actual support for UTF-8? I mean, on console, using LC_CTYPE=es_ES.UTF-8 I have the following "typos":





Notice the "--" at ls(1), and the "â–¸" at the NERDTree plugin in vim. As a side note, when using es_ES.ISO8859-15, ls(1) is displayed correctly (not in vim)
As another side note, the vim encoding is UTF-8, and the terminal is x11/rxvt-unicode.

Why is my system doing this? How can I get it to work?

Thanks.
 
Hello graudeejs,

How? I mean, X(7), says that LC_* variables are environmental, at first I tought that, since in my computer launches Xorg as root, changing root's .csh file would set it up nicely, so I changed it, and there has been no more changes.

After that I tought that maybe X was run as another user, so I set up my ~/.xsession and added the LC_* lines, I rebooted and it also didn't work.

Could you please give me some pointers about this?
 
To be sure it works for me, I set LOCALE in ~/.xinitrc (.xsession is symlink to ~/.xinitrc) and in ~/.profile

You can check my dotfiles: https://github.com/graudeejs/dot.files

Would be nice, if I could check yout configs, that would be much faster than blindly guessing what isn't working.

BTW, what shell do you use, what WM, and not tell me your using root to log in in X.
 
At the very top of my .xinitrc I have
Code:
[ -f "$HOME/.profile" ] && . "$HOME/.profile"

This means read (source) .profile :d
Since .xinitrc, .profile and .shrc are all shell scripts, it's all perfectly valid.

BTW, you didn't give link.

EDIT:
Ok, it just showed up.
 
In your .zshrc, you have
Code:
export LANG=en_US.ISO8859-15
export LC_CTYPE=es_ES.ISO8859-15
export LC_COLLATE=es_ES.ISO8859-15
export LC_TIME=es_ES.ISO8859-15
export LC_NUMERIC=es_ES.ISO8859-15
export LC_MONETARY=es_ES.ISO8859-15
export LC_MESSAGES=en_US.ISO8859-15
export MM_CHARSET=es_ES.ISO8859-15
That's not unicode.

Also you don't set locale in your .xinitrc. I had weird behaviour until I started setting locale in both shell startup script and .xinitrc.
 
graudeejs said:
Code:
[ -f "$HOME/.profile" ] && . "$HOME/.profile"

That makes sense, I currenly use es_ES.ISO8859-15 to be able to use accents and characters like ñ.

Ok, I'm going to give it a try now.

Thanks.
 
athos said:
Ok, I set it all up, and now things are starting to work, thanks!

There's still a little problem:



Do you guys know why I can't see this correctly?
I'm going to push the git repo (already done)
Remember: https://github.com/4thos/dotfiles

Setp 1) verify that you use unicode in shell and X apps
Step 2) verify that vim is configure to use unicode

EDIT, I wouldn't be too surprised if those artifacts are because of how you set t_Co in vim

You may try my vim configuration https://github.com/graudeejs/dot.vim/blob/master/vimrc as it's 100% working with UTF-8

BTW, that was in console or GUI? (Sounds weird, but vim can be configured so that you can't tell the difference).

Time for me to sleep, see you.
 
graudeejs said:
Setp 1) verify that you use unicode in shell and X apps
Step 2) verify that vim is configure to use unicode

BTW, that was in console or GUI?

Well, it seems I am actualling using UTF-8 at both shell and X applications (I can write this at both 攢ð€đŋħ→jĸłµnøþ@¶ßŧ↓“ł»←«).

I tried your vim configuration, and it didn't work (and mine using encoding=utf-8[/fle] neither worked)

This is quite weird, the character used at gvim "â–¸" can't get displayed at terminal. Perhaps it has to do with x11/rxvt-unicode .Xresources, I'm going to take a look at the manual.

(That last scrot was actually vim at terminal)

EDIT: The manual says nothing about this.

EDIT2: Those artifacts are also displayed when I read a manual page, and the word is trun-
cated like this ($PAGER == less)
 
Well, it finally works...

Do you know of any font viewer like xfontsel to use with Xft fonts?

Many thanks graudeejs!

Here's the proof! (it's vim)

 
Back
Top