Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#190 uses wrong locale charmap

other (39)

System: Debian etch
Joe version: 3.5 (3.5-1.1)

With the settings:
echo $LANG -- en_CA
locale charmap -- UTF-8
cat /etc/locale.gen -- en_CA UTF-8
locale -a -- C en_CA en_CA.utf8 POSIX
echo $TERM -- linux
joe starts up with this at the bottom of the screen:
** Joe's Own Editor v3.5 ** (iso-8859-1) ** Copyright (C) 2006 **
which indicates that joe is not detecting the system charmap properly.

In addition, if you edit a file which is in utf-8, joe isn't able to refresh or hold cursor position properly on a terminal which supports utf-8. Note that vim does deal with this properly. Also, if you set LANG=en_ca.UTF-8, joe displays the correct footer and utf-8 data works properly (refreshes, cursor position) on the terminal.

Because this involves the terminal, my terminal is SecureCRT (, configured as Linux emulation with UTF-8 on.


  • Logged In: YES
    Originator: NO

    Could you please post the value of all your environment variables beginning with LANG or LC_? Hint: in bash, typing "echo $LANG" or "echo $LC_" and then pressing TAB helps find these. Also, the output of the "locale" command might be useful.

    You say, LANG=en_CA.UTF-8 solves these problems. On my Linux system, en_CA is an iso-8859-1 locale, this is glibc's default, so unless Debian patches this, this is the case on your system, too. The output of "locale -a" suggests this, too. The only thing I can't understand is why "locale charmap" says UTF-8 instead of ISO-8859-1. However, if you are using an UTF-8 terminal, is there any reason why your LANG is not set to LANG=en_CA.UTF-8? That would be the right way to go, and would solve your problems with joe.

    Also, please make sure that "locale" and "joe" are binaries under /usr/bin or something like that, not wrapper scripts written by you or shell aliases and such. "type -a joe", "type -a locale" shows this.