caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: hugo <hugo.heuzard@gmail.com>
To: "Sébastien Dailly" <sebastien-ocaml@chimrod.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Strange result with Lexing
Date: Thu, 2 Apr 2015 11:46:57 -0400	[thread overview]
Message-ID: <CAEYcRDGxMT-MXOiHcwiU_3fBQKb=dLvOmbm2UEJeRaedQsJ_zw@mail.gmail.com> (raw)
In-Reply-To: <ebb918ce3a944148219a68a2db15aade@chimrod.com>

I guess you're using `Lexing.from_channel` with and `open_in`.
If so, you might want to use `open_in_bin` instead.

http://www.cycle.org/manuals/cygwin/using-textbinary.html

On Thu, Apr 2, 2015 at 11:22 AM, Sébastien Dailly
<sebastien-ocaml@chimrod.com> wrote:
> Hello,
>
> I've found a strange result when calling Lexing.lexeme_start and
> Lexing.lexeme_end on DOS format file (with \r\n instead of \n).
>
> The value returned by the two functions is wrong when the file is in DOS
> format (the result does not change when I convert the file in UNIX format,
> but this is what I expect).
>
> I there something I misunderstood in the documentation ?
>
> (I've compiled ocaml with opam on cygwin).
>
> Regards,
>
> --
> Sébastien Dailly
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

  parent reply	other threads:[~2015-04-02 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 15:22 Sébastien Dailly
2015-04-02 15:42 ` Török Edwin
2015-04-02 15:46 ` hugo [this message]
2015-04-03  7:25   ` Sébastien Dailly

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='CAEYcRDGxMT-MXOiHcwiU_3fBQKb=dLvOmbm2UEJeRaedQsJ_zw@mail.gmail.com' \
    --to=hugo.heuzard@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=sebastien-ocaml@chimrod.com \
    /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;
as well as URLs for NNTP newsgroup(s).