On Sun, 18 Jun 2006, Ola Bini defenestrated me: > > It seems this wasn't to hard to solve, actually. At least I've got > something that actually works right now. I've modified IOModes to > include a Binary-flag, and IOHandlerSeekable to check lineendings if > we're on a platform where it's not '\n' ... This actually seem to solve > the issue for now. Patch attached.
So I think all network IO is using IOHandlerNio so IOHandlerSeekable is only used by files, so putting this logic should be safe. So when we run generate scripts we generate files that have \r\n instead of \n because Java is getting all tricky on us. On MacOS X I think it will generate just \r and no \n at all. Now when we read in this stuff we are reading in the \r and this is screwing up our: regular expressions? string functions? I know Charlie played with not writing out the \r\n in the first place. Your strategy is to be more forgiving on what we read. One small issue with your strategy is that I think the offset in the file will be wrong (it is seekable which makes this more of an issue). I am rambling now...I guess I am confused on whether this is the right thing to do or not? I think we all really want a solution to this for 0.9.0, but I am not sure if this is it or not. We could even put it in and do something else after release. -Tom -- + http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+ | Thomas E Enebo, Protagonist | "Luck favors the prepared | | | mind." -Louis Pasteur | _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel