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

Re: common issue: setlocale handling?



On 22.08.2010 09:44, Paul Wise wrote:
On Sun, Aug 22, 2010 at 3:40 PM, Jakub Wilk<jwilk@debian.org>  wrote:

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.

hmm.
In C it is because the POSIX application usage don't check for errors.
I assume POSIX people prefers to use the old locale instead of
handling the error. [Note it is on the non normative part]
But a good program probably should check return errors and at minimum
warn user about failed setlocale, also in C.

Python philosophy is different: unexpected error should be reported
and handled.

The perl behaviour in Debian is annoying, because on some upgrades
we have a lot of transient errors. (I think pre-depends is a overkill
for maintainers and for dpkg dependency handling). But we should remember that preinst and postinst scripts could have a not yet
"compiled" locale, thus invalid.

For these raison, I think the better behaviour is to "fix" application
to warn and continue if the application output is not too sensible
to the locale (and pre-depends locale if application is used in postinst
scripts)

ciao
	cate


Reply to: