From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id B82787FCEF for ; Thu, 2 Apr 2015 17:47:18 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of hugo.heuzard@gmail.com) identity=pra; client-ip=209.85.212.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hugo.heuzard@gmail.com"; x-sender="hugo.heuzard@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of hugo.heuzard@gmail.com designates 209.85.212.172 as permitted sender) identity=mailfrom; client-ip=209.85.212.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hugo.heuzard@gmail.com"; x-sender="hugo.heuzard@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f172.google.com) identity=helo; client-ip=209.85.212.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="hugo.heuzard@gmail.com"; x-sender="postmaster@mail-wi0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DuAgD1Yx1VlKzUVdFcg1pcBYMQsjKEDIwPhXMCgT8HTAEBAQEBARIBAQEBBwsLCRIwQQKDXAEBBBIRHQEbEgsBAwwGBQsNAgIJHQICIgERAQUBChIGEwkJEId4AQMRDalDPjGLNoFrgneNMQoZJwMKVIRwAQEBAQEFAQEBAQEBFgEFDoETigiCXoFoMweCaIFFBYUQCoxWAYJuhguBV5EnEiOBDAmELCIxAYJCAQEB X-IPAS-Result: A0DuAgD1Yx1VlKzUVdFcg1pcBYMQsjKEDIwPhXMCgT8HTAEBAQEBARIBAQEBBwsLCRIwQQKDXAEBBBIRHQEbEgsBAwwGBQsNAgIJHQICIgERAQUBChIGEwkJEId4AQMRDalDPjGLNoFrgneNMQoZJwMKVIRwAQEBAQEFAQEBAQEBFgEFDoETigiCXoFoMweCaIFFBYUQCoxWAYJuhguBV5EnEiOBDAmELCIxAYJCAQEB X-IronPort-AV: E=Sophos;i="5.11,511,1422918000"; d="scan'208";a="108118457" Received: from mail-wi0-f172.google.com ([209.85.212.172]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 02 Apr 2015 17:47:17 +0200 Received: by wiaa2 with SMTP id a2so110275978wia.0 for ; Thu, 02 Apr 2015 08:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=rvw9sUPt8Sp7fqRuZLrrqRtfUiE38Qdz6WJ9LfHxX2U=; b=VUgPW66oWjk/MjRGEEeFswZMuMwNWmaSIq0jqmWkj7Ya28Dtqqs/RN9g8/ybPW+DFH qeUIi+R9o9+rG9mqqJAfTddP1PTy6dpFOx32DqL+chGJRB4CYidllwwEf0t6Irzzp+1f o8YGjHIEZYpeVLrIgO/4s9jU36F22l6zlVMj5h14ZMDIZ2ephgUscQ6CGkclBVxLJEjV +q4qpkNurhry7vi0T+uGbjeiTnozTWujVa7LtPzZwTIQSaEwYzdbTz0S4dWmMkaKB/vw eY9ra5QS+4x8MQNiOtfTnaeiqDH15/Ny7lyI0UoY0o2/jd5P4sNS+uY2yJzrouudUaOj fUaQ== X-Received: by 10.194.243.9 with SMTP id wu9mr5858929wjc.107.1427989637725; Thu, 02 Apr 2015 08:47:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.27.76.208 with HTTP; Thu, 2 Apr 2015 08:46:57 -0700 (PDT) In-Reply-To: References: From: hugo Date: Thu, 2 Apr 2015 11:46:57 -0400 Message-ID: To: =?UTF-8?Q?S=C3=A9bastien_Dailly?= Cc: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Strange result with Lexing 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=C3=A9bastien Dailly 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=C3=A9bastien 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