[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: common issue: setlocale handling?



OoO En cette  matinée ensoleillée du dimanche 22  août 2010, vers 09:44,
Paul Wise <pabs@debian.org> disait :

>> I don't think this is a bug at all. I'd rather say it's an user error.

> I disagree, stuff written in C or Perl doesn't crash when the locale
> is not set properly and neither should stuff written in Python.

Perl spits  out a  lot of  annoying warnings when  using a  non existing
locale. And it does this for any perl script.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "jhfjkghf"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

However, I don't say that the problem  does not exist in Python. I see a
lot those kind of errors with Perl because I log into servers that don't
have my locale  installed. There is not much to do  because ssh does not
allow to  remove some  variables from environment  that have  been added
server side (with AcceptEnv). It would be better to switch silently to C
locale than to display a lot of useless warnings or just stop.
-- 
# Basic IBM dingbats, some of which will never have a purpose clear
# to mankind
	2.4.0 linux/drivers/char/cp437.uni

Attachment: pgp6rI2NrWafI.pgp
Description: PGP signature


Reply to: