From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2S7WRFs017802 for ; Mon, 28 Mar 2011 09:32:27 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8CAKc4kE3RVdQ2kGdsb2JhbACEQ6B/CBQBAQEBCQkNBxQEIaZsihg8giGDcS+IXAEBAwWEbXcEhTiHP4Z/ggw6 X-IronPort-AV: E=Sophos;i="4.63,253,1299452400"; d="ml'?scan'208,222";a="95122429" Received: from mail-vw0-f54.google.com ([209.85.212.54]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 28 Mar 2011 09:32:21 +0200 Received: by vws18 with SMTP id 18so3915430vws.27 for ; Mon, 28 Mar 2011 00:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=P6A3zi5pR6Tz0Pykxbg+ai+DvioN8gggwVWRGz0yk+c=; b=kHwXlezxV/DucibqeRKDsByd+5gbXQ8fXrTZ6U0RRx/SUkYq/FoGM4fX+aPXyqFFw+ J6Uas69SgW9+s6llvMu8vs8WV57SIM3aBYsLfaM52wUrY3ZpnR0P5JhJmthbjawYaOl4 MSt9U5wtRpb3yP8DlvG3xbzqTTJOggmA5dLto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=MpI69OQY07U0iak8IPKvzGLDgSWknhv5q/rwucZNezoMbyJRouUruA6LXB1ct6CRTI REoffy/sckr4AFgnLp15ZjBpisQzepMKO7x81UKmUf/wQbOT8pQ/VktMcKlWBE9zANUR NebK6RusqIHjz/bWOcuNZWOIWBFp7XW2KlObc= Received: by 10.220.193.193 with SMTP id dv1mr1030100vcb.96.1301297540338; Mon, 28 Mar 2011 00:32:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.118.11 with HTTP; Mon, 28 Mar 2011 00:32:00 -0700 (PDT) From: Yoriyuki Yamagata Date: Mon, 28 Mar 2011 16:32:00 +0900 Message-ID: To: Caml List Content-Type: multipart/mixed; boundary=90e6ba53aab2a393e0049f85f1fa Subject: [Caml-list] slight difference of behavior of OCaml on MinGw and Linux --90e6ba53aab2a393e0049f85f1fa Content-Type: multipart/alternative; boundary=90e6ba53aab2a393cb049f85f1f8 --90e6ba53aab2a393cb049f85f1f8 Content-Type: text/plain; charset=ISO-8859-1 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/ --90e6ba53aab2a393cb049f85f1f8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, list.

I think I found a slight difference of behavior of OCaml o= n MinGW and Linux regarding the EOF character.=C2=A0 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.=C2=A0 Is this a supposed behavior?=C2=A0

(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.=C2= =A0 On Linux, doing
ocaml testEoF.ml < UTF-32#LE
outputs the whole file before the except= ion End_of_file, but on MinGW, the script fails in the middle of Etruscan t= ext, which happens to contain 0x1a character.

Best,=C2=A0

--=
Yoriyuki=E3=80=80Yamagata
yoriyuki.y@gmail.com
http://sites.google.com/site/yoriyukiy/=

--90e6ba53aab2a393cb049f85f1f8-- --90e6ba53aab2a393e0049f85f1fa Content-Type: application/octet-stream; name="testEoF.ml" Content-Disposition: attachment; filename="testEoF.ml" Content-Transfer-Encoding: base64 X-Attachment-Id: f_glt2uk540 d2hpbGUgdHJ1ZSBkbw0KICBvdXRwdXRfY2hhciBzdGRvdXQgKGlucHV0X2No YXIgc3RkaW4pDQpkb25lDQo= --90e6ba53aab2a393e0049f85f1fa Content-Type: application/octet-stream; name="UTF-32#LE" Content-Disposition: attachment; filename="UTF-32#LE" Content-Transfer-Encoding: base64 X-Attachment-Id: f_glt2v8x71 //4AAJEDAACSAwAAkwMAAJQDAACVAwAAlgMAAJcDAACYAwAAmQMAAJoDAACb AwAAnAMAAJ0DAACeAwAAnwMAAKADAAChAwAAowMAAKQDAAClAwAApgMAAKcD AACoAwAAqQMAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAA ACAAAAA8AAAALQAAACAAAABHAAAAcgAAAGUAAABlAAAAawAAAAoAAAAAAwEA AQMBAAIDAQADAwEABAMBAAUDAQAGAwEABwMBAAgDAQAJAwEACgMBAAsDAQAM AwEADQMBAA4DAQAPAwEAEAMBABEDAQASAwEAEwMBABQDAQAVAwEAFgMBABcD AQAYAwEAGQMBABoDAQAbAwEAHAMBAB0DAQAgAAAAIAAAACAAAAAgAAAAPAAA AC0AAAAgAAAARQAAAHQAAAByAAAAdQAAAHMAAABjAAAAYQAAAG4AAAAKAAAA QQAAAEIAAABDAAAARAAAAEUAAABGAAAARwAAAEgAAABJAAAASgAAAEsAAABM AAAATQAAAE4AAABPAAAAUAAAAFEAAABSAAAAUwAAAFQAAABVAAAAVgAAAFcA AABYAAAAWQAAAFoAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAA ADwAAAAtAAAAIAAAAEwAAABhAAAAdAAAAGkAAABuAAAACgAAABAEAAARBAAA EgQAABMEAAAUBAAAFQQAABYEAAAXBAAAGAQ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