From: Jochen Hayek Date: 2008-01-16T01:02:59+09:00 Subject: Re: does ruby's strftime not attempt POSIX-compliance? Michal Suchanek wrote: > 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. The standard dates presumably in the pre-threaded times. > Is it thread-local or per process? > If it is per-process, Are we talking about software with a web GUI like rails?!? Aren't they MVC-based?!? Are they really talking to more than one user per instance?!? Don't we have a fresh process for a request each time any way?!? > how can a multithreaded process work with data in multiple languages? Pls don't feel insulted, and the question is interesting but in real life maybe not too relevant, as I discussed it above. > 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. I actually "humbly request" :-) that (g)libc's locale capabilities are just passed straight through, where they are available, and that they should not just be made use of for internal things and then kept away from the public, as it wasn't quite kosher the way is was done and made use of in some "middleware". We ("the community") can certainly wait a little while until all that is cleaned up, but then we want to have fair competion with what perl and python can do locale-wise. > 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. Of course something tremendously shining can be done and added to ruby libraries, so that the ruby way will turn out again to be the far better way. But for short-term: Pls give us libc's locale capabilities and don't keep it for yourself! Just my ��� 0.02. J. -- Posted via http://www.ruby-forum.com/.