On Wed, Jun 21, 2006 at 02:26:40AM +0200, Rafael Laboissiere wrote: > Could you please try the modified conjugue script below: > > #!/usr/bin/perl -w > my $encoding = (my @lines = `locale charmap`)[-1]; > chomp $encoding; > my $script = "/usr/bin/conjugue-$encoding"; > if (-f $script) { > system ($script, @ARGV); > } else { > die "Current locale charmap `$encoding' is unknown to conjugue.\n" > . "Accepted charmaps are UTF-8 and ISO-8859-1.\n"; > } >
Your script seems to be very robust now! I used the commands "locale" and "locale charmap" to check what was happening and you are correct: if no charmap is set by the user, the system inherits the default one. I reconfigured my locales and set "none" as the default system locale, and didn't set my personal locale. If I open either xterm or console I get: $ locale LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL= $ conjugue Current locale charmap `ANSI_X3.4-1968' is unknown to conjugue. Accepted charmaps are UTF-8 and ISO-8859-1. However, if I open uxterm it automatically converts LC_CTYPE into "en_US.UTF-8" and conjugue does its job and calls conjugue-UTF-8. It seems that the script will never print the hundreds of lines of error messages. I think that The worst thing that might happen is the existence of a mismatch between the user's locale configuration and the charmap of his terminal. But in this case all applications that output non-ASCII characters will print strange letters. Thanks, Jakson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]