From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 06 Jan 2008 22:04:21 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1199569265-sup-4567@clarabella.clarabella> References: <1199569265-sup-4567@clarabella.clarabella> Message-ID: <1199685831-sup-2011@south> Excerpts from Giorgio Lando's message of Sat Jan 05 13:46:43 -0800 2008: > I had initially some problems with encoding in sup (accented chars > were not displayed). So I have looked in lib/sup.rb and I have seen > that sup tries to determine the $encoding from the $ctype, determined > on its turn by LC_CTYPE and LANG. This failed in my case (I do not > know why: my $LANG is it_IT and my $LC_ALL - implying $LC_CTYPE - is > it_IT at euro). The current way I choose the encoding is a complete hack, and clearly doesn't work for your case. (It looks for a . at the end of LANG or LC_CTYPE). But I'm not really sure what the correct way is. What does this command produce on your system? "locale -c LC_CTYPE | head -6". > $encoding = ENV["CHARSET"] I don't really want to use a non-standard environment variable if at all possible... -- William