[plt-scheme] Why do MzScheme ports not respect the locale's encoding by default?

From: Jim Blandy (jimb at redhat.com)
Date: Fri Feb 18 20:34:37 EST 2005

Jens Axel Søgaard <jensaxel at soegaard.net> writes:
> The problem were that we use comma to separate the integer part of a
> number from the fractional part. The program probably used a normal
> C routine to print the numbers getting output as 3.14 but the
> reader was aware of the locale and were expecting 3,14 as input.
> Since then I have been somewhat sceptically about automatic locale.


(Are you sure your description is accurate?  printf does respect the
locale's decimal point setting, so it should have been printing
"3,14".  And scanf and strtod respect locale, too.  I'll bet that the
problem was in the parser: it probably broke the input at commas,
yielding garbage, and then passed each comma-free string to strtod or

But let me poke at your skepticism a bit.  Keeping in mind your story,
and Alex's story about the EUC-JP dictionary, do you think most users
want applications to respect locale settings --- and specifically, the
character encoding --- or do you think most users would like
applications to ignore them?

It's my belief that users want their locale settings respected --- but
they also want application writers to be more conscious of locale's
effects.  Which is why I'm raising the issue here, and trying to
provide background.  But in the end I want to be like John Maynard
Keynes: "When the facts change, sir, I change my mind."  If users
don't actually like locales, if they find them confusing more often
than they find them helpful, then it's hardly worth the trouble to
support them.

So what do you think?

Posted on the users mailing list.