From: Yoriyuki Yamagata <yoriyuki.y@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: [Caml-list] slight difference of behavior of OCaml on MinGw and Linux
Date: Mon, 28 Mar 2011 16:32:00 +0900 [thread overview]
Message-ID: <AANLkTimDaAs+BRAPFwtVm9WVJBNDUSy1Kmqpv8k14PkS@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 827 bytes --]
Hi, list.
I think I found a slight difference of behavior of OCaml on MinGW and Linux
regarding the EOF character. On Linux, the EOF char in the middle of a file
is ignored, but on MinGW, the attempt to read EOF causes End_of_file
Exception. Is this a supposed behavior?
(ok, I have found some discussion on EOF on beginners list, but cannot find
something exactly answering this problem.)
I attached an ocaml program (which is simply a cat) and a file which
reproduce the problem. On Linux, doing
ocaml testEoF.ml < UTF-32#LE
outputs the whole file before the exception End_of_file, but on MinGW, the
script fails in the middle of Etruscan text, which happens to contain 0x1a
character.
Best,
--
Yoriyuki Yamagata
yoriyuki.y@gmail.com
http://sites.google.com/site/yoriyukiy/<https://sites.google.com/site/yoriyukiy/>
[-- Attachment #1.2: Type: text/html, Size: 998 bytes --]
[-- Attachment #2: testEoF.ml --]
[-- Type: application/octet-stream, Size: 62 bytes --]
while true do
output_char stdout (input_char stdin)
done
[-- Attachment #3: UTF-32#LE --]
[-- Type: application/octet-stream, Size: 1068 bytes --]
next reply other threads:[~2011-03-28 7:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 7:32 Yoriyuki Yamagata [this message]
2011-03-28 8:13 ` David Allsopp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimDaAs+BRAPFwtVm9WVJBNDUSy1Kmqpv8k14PkS@mail.gmail.com \
--to=yoriyuki.y@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox