LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Write special unicode chars in hardstatus of GNU Screen (http://www.linuxquestions.org/questions/linux-software-2/write-special-unicode-chars-in-hardstatus-of-gnu-screen-908138/)

simonbcn 10-14-2011 05:31 AM

Write special unicode chars in hardstatus of GNU Screen
 
Hi,
I want write the next specials chars to hardstatus of GNU Screen: "↑" (up arrow) and "↓" (down arrow), but it shows strange chars. How can I do this?
This worked to me before but I have to reinstall my SO (Ubuntu 11.04) and now it doesn't work.
Thanks in advance.
Regards.

ADD:
Config files
Code:

  $ cat ~/.screenrc
deflogin off
shell bash

termcapinfo xterm* ti@:te@
backtick 25 1 1 $HOME/bin/scripts_screen/velocidad_eth1
backtick 26 300 300 $HOME/bin/scripts_screen/espacio_libre_servidor
backtick 27 300 300 $HOME/bin/scripts_screen/espacio_libre_menor_que
hardstatus alwayslastline "  %{= Wb}%LD %d %LM, %c %{=b Wk}| %?%{=b rg}%27`%:%{= Wm}%?Espacio libre: %26` %{=b Wk}| %{= Wk}%25`"

Code:

  $ cat $HOME/bin/scripts_screen/velocidad_eth1
#!/bin/sh
bajada=`ifstat -qwni eth1 0.1 1 | tail -n 1 | awk '{print $1}'`
subida=`ifstat -qwni eth1 0.1 1 | tail -n 1 | awk '{print $2}'`
echo "↓ $bajada / ↑ $subida"

I think this problem is related to enconding but my locales are correct:
Code:

LANG=es_ES.UTF-8
LANGUAGE=es_ES:en
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE=C
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES=POSIX
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

This is a capture of a screen session:
http://i.stack.imgur.com/8icXQ.png

You can see that the unicode characters in terminal are correct but not the unicode chars of hardstatus/caption screen.


All times are GMT -5. The time now is 12:37 PM.