Actually, I think I've found a solution that may work, but you'll have to tell my what you think about this.
The plan is to change IOHandlerSeekable#sysread, IOHandlerUnseekable#sysread and IOHandlerNIO#sysread. They will have to know if it is a file we're reading (how can we know this from these places?) and if it should be read binary or not. As far as I can see, it's hard to find out from IOModes whether we're reading binary or not. So, I'll wait with implementing this until later today, so please hit me back with suggestions on how to do this the best way. Regards Ola Bini ----- Original Message ----- From: Ola Bini <[EMAIL PROTECTED]> Date: Sunday, June 18, 2006 3:48 pm Subject: [Jruby-devel] The line-separator problem. To: jruby-devel@lists.sourceforge.net > Hi > > A week or so ago, I wrote about a Win32-specific problem with rails > andother things in JRuby. The dreaded line separator. When reading > a file > like text in Ruby, it automatically converts the platforms line > separator to '\n', so on Win32 all \n\r-sequences gets turned into > only\n. This seems like it would not be such a big thing to > implement in > JRuby, but since our current IO-handling situation is ... somewhat > complex, I've been unable to create something that gives us this > functionality without rewriting significant parts of the IO-handling > code, which I'm not really inclined to do, anyway. > > So, are there any fun suggestions about this? I for sure would really > like Rails to work on windows too. Where is the best place to add this > functionality? > > Regards > Ola Bini > > > _______________________________________________ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel > _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel