[spambayes-dev] Config files and locale

Mark Hammond mhammond at skippinet.com.au
Fri Jul 25 11:34:04 EDT 2003

> > Even in this perfect world, we have the same issue:  If we 
> > ever want to ship a config file containing floats, we must 
> > agree on either periods or commas as the decimal.  If we do 
> > that, we prevent the user entering numbers using their 
> > regional settings, if that differs from what we decide.
> As another option, what about requiring a leading option if the locale
> is not 'en'.  For example:
> """
> [globals]
> config_language: german
> [Categorization]
> spam_cutoff: 0,10
> """

In my example of shipping config files with floats, it doesn't help too
much.  If the user adds such an option, they will also need to modify every
existing float first - and the penalties of not doing so can be subtle - eg
yesterday, I watched my cutoff scores get successively multipled by 100 each
time the config file was loaded and saved (which is just a side effect of
mismatched locales and the absurd conversions we saw yesterday)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2116 bytes
Desc: not available
Url : http://mail.python.org/pipermail/spambayes-dev/attachments/20030725/979348b7/winmail-0001.bin

More information about the spambayes-dev mailing list