From: Jochen Hayek Date: 2008-01-13T07:20:17+09:00 Subject: Re: does ruby's strftime not attempt POSIX-compliance? Pls let me assure you in the beginning of this note, that it's not my intent to start any flame war and also that I do not want to offend anybody honorable. It's only about reasonable employment of good willing programmers' resources and constructive use of pre-existing software and standards like glibc, POSIX, ... >> Suraj Kurapati wrote: >>> See this post for an example: >>> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/57474 The article referred to here talks about an interpreter patch dated around 2002, that did not make its way into "MRI" by now, de facto it's not part of 1.8.6, neither is it part of 1.9, let's call it dead therefore. I would love to learn, that I am not right there, but I do fear, I am. If I understood Matz correctly, then "1.9 calls setlocale() ... for LC_TYPE" *internally* and obviously setting any of the LC_* environment variables of a ruby script has *no* *effect* *whatsover*. Apparently these env. variables get overwritten within the interpreter, let's consider this locale setting as "*frozen*", and is my assumption correct, that various rather "central" software makes uses of this *frozen* locale, I mean e.g. all the library code, that handles HTTP protocol date/time strings. Therefore that "central" code would break, if the interpreter and its "kernel library code" would get the *frozen* locale setting removed. Is that correct? But wouldn't it still be a good idea, to give the world, what (g)libc actually already implements, I mean all the features directed by those LC_* env. variables, e.g. language/region dependant date/time strings, currency, thousands/decimal separators, etc. pp.?!!!! I mean it shouldn't be that hard to cure the code, that depends in turn on that frozen locale setting, and furtheron to remove this freezing, right? Instead programmers interested in doing I18N / M17N capable ruby and therefore particularly also rails code all around the world have to desperately seek ways to implement I18N / M17N. That sounds like a tremendous waste of resources because of a maybe unlucky decision regarding the frozen locale setting. J. -- Posted via http://www.ruby-forum.com/.