On 14/01/2008, Yukihiro Matsumoto <matz / ruby-lang.org> wrote:
> Hi,
>
> In message "Re: does ruby's strftime not attempt POSIX-compliance?"
>     on Mon, 14 Jan 2008 21:32:09 +0900, "Michal Suchanek" <hramrach / centrum.cz> writes:
>
> |Could you be more specific about the problems you envision?
>
> |I would expect that ruby core classes would behave exactly the same
> |regardless of locale.
>
> Some may consider THIS as a bug.  Month names, day names, or even
> decimal points differ locale to locale.  One expect Ruby to honor
> locale.  The other feels contrary as you do.  That's a problem.
>
I think that locale as defined by posix is not very well thought out.
For one, I do not see any specification of the scope of the
setlocale() call. Is it thread-local or per process? If it is
per-process, how can a multithreaded process work with data in
multiple languages?

That's why I suggest that locale should be supported by an add-on
library that allows formatting/scanning/sorting/... according to
current locale but ruby core should work the same regardless of
locale.

It does not imply that the ruby core should not implement sorting (or
ther functionality) that respects language-specific rules. I just
suggest that this functionality should be done independent of locale
in a more object-oriented way if it is done in ruby. It should also be
portable to systems that do not implement POSIX locale.

Thanks

Michal