|
RE: Strange problems with binary file output: result of incorrect size: msg#00029lang.haskell.glasgow.bugs
On 16 June 2004 01:07, Mike Aizatsky wrote: > Simon, > > Sorry it was clearly my fault. I was quite sure I'm using the > openBinaryFile, while I was using openFile. Turned out after several > more hours of tough debugging. > > BTW, wouldn't it be better if there were text/binary output functions > instead of text/binary files? It makes sense to output strings in text > mode, but arrays of Word8 in binary mode (my case). It looks at least > strange, that while writing the array with 0xA the values are written > as 0xD 0xA (text conversion). This is one of the weak areas of the current IO library. There have been some efforts to redesign things, but nothing substantial yet. Text translation on Windows is just one case of text encoding/decoding between Strings in Haskell and external files, and we want to solve this problem in a general way. Cheers, Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-973766 ] ghci coredumps, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-973766 ] ghci coredumps, SourceForge.net |
| Previous by Thread: | Re: Strange problems with binary file output: result of incorrect size, Mike Aizatsky |
| Next by Thread: | TH: 'name syntax does not work for some names, Duncan Coutts |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |