| Anonymous | Login | Signup for a new account | 2013-05-19 11:47 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0002050 | OCaml | OCaml general | public | 2004-01-21 16:44 | 2012-01-27 20:05 | |||||||
| Reporter | administrator | |||||||||||
| Assigned To | ||||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||||||
| Status | resolved | Resolution | won't fix | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | ||||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0002050: input_line keeps ending \013 | |||||||||||
| Description | Full_Name: Mattias Version: 3.07#2 OS: Mandrake 8.2 Submission from: c-44dd71d5.09-253-7570701.cust.bredbandsbolaget.se (213.113.221.68) I switch between cygwin and linux. I had to write my own input_line that removes final \013. I assume this is a crlf/lf-problem. I didn't have this problem in 3.06, but I guess it depends on where the file was created, so maybe the case didn't occur earlier. (** input_line but remove final '\013' which occurs if files are created on Windows *) let my_input_line ic = let str = input_line ic in if str.[String.length str - 1] = '\013' then String.sub str 0 (String.length str - 1) else str ;; | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0006832) doligez (manager) 2012-01-27 20:05 |
You have to know what file format you are using, a computer cannot guess that for you. Usually, the best solution is to write your program to ignore all CR characters in its input. But it would be a bug for the standard library to do that on all inputs. input_line has no business removing arbitrary characters from the input data. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| 2012-01-27 20:05 | doligez | Note Added: 0006832 | |
| 2012-01-27 20:05 | doligez | Status | acknowledged => resolved |
| 2012-01-27 20:05 | doligez | Resolution | open => won't fix |
| 2012-01-27 20:05 | doligez | Description Updated | View Revisions |
| Copyright © 2000 - 2011 MantisBT Group |