From: Gavin Sinclair Date: 2002-12-30T19:33:42+09:00 Subject: Re: WARN: mswin32 build binary file read change of behavior On Saturday, December 28, 2002, 10:51:23 PM, Milan wrote [snipped]: > Hello, > Maybe it's been mentioned before, but since I've spent some time looking for > error in my code (things broke), here it goes anyway, in case somebody runs > into this issue (low chance, this mostly being Linux crowd, but still...). > Maybe putting it in a FAQ isn't a bad idea. I appreciate your forethought for the FAQ, but I'm not really sure what sort of entry to put. Could you please suggest a question and an answer, and we'll discuss it, and if we get something that makes sense, it can go in the FAQ. Keep it on the list: the more comments on the proposed entry, the better. > In mswin32 builds one must explicitly specify "rb" flags. > > File.open( 'somebinaryfile.bin', "rb" ) I personally use the "b" flag whenever appropriate no matter what platform I'm on. Even though it makes no difference on Unix, the "b" flag is still a comment to make it more clear what we expect to do with the data. Cheers, Gavin