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 D60E77EE79 for ; Mon, 16 May 2016 09:30:26 +0200 (CEST) IronPort-PHdr: 9a23:FD1n0BEFSAdC+4lzM6Fnxp1GYnF86YWxBRYc798ds5kLTJ74osWwAkXT6L1XgUPTWs2DsrQf27uQ6f2rADVRqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7H0ocCYOlwZzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzaz3cGU2gQ2jxBDwXfpEXzUo3wvy3SsO1h22+dJ8KgCfgdXzi44q5wACXvkzwNOiQ2uDXNjddrhq9Brzqkvx062JHPJoaPO6wtRK7FecImQj9EV9pNVy1MH8WwcoESAOcdFeldpoj54VAJqEiQHw6pUcbm1iNIh3LrlYEn2fkuHB2OiAkpA84OsXnJ6tnoProdXPydw6zBzDGFZPRTj2SuoLPUewws9KnfFYl7dtDcnAx2T1vI Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=matthieu.dubuget@gmail.com; spf=Pass smtp.mailfrom=matthieu.dubuget@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f41.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of matthieu.dubuget@gmail.com) identity=pra; client-ip=74.125.82.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="matthieu.dubuget@gmail.com"; x-sender="matthieu.dubuget@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of matthieu.dubuget@gmail.com designates 74.125.82.41 as permitted sender) identity=mailfrom; client-ip=74.125.82.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="matthieu.dubuget@gmail.com"; x-sender="matthieu.dubuget@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-wm0-f41.google.com) identity=helo; client-ip=74.125.82.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="matthieu.dubuget@gmail.com"; x-sender="postmaster@mail-wm0-f41.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CFAAD2dTlXiClSfUpehAx+pyWHNosLAQ2Bdh6FcwKBIzgUAQEBAQEBAQERAQEBCAsLCR8xgi2CFgEBBAsHEQgHAQ0BGxwBAQMMBgULDwIFFgsCAgkDAgECAREMAQQBBQEDARgGAQwIAQEXB4dyAQECFwQKnk+BMT4xizuBagSCVAWBXIUsChkEChkNUoNVAQEBAQEBAQEBAQEBAQEBAQEBARYCAQUQcYMaggqETYc/gj0cBZgngVaEKIggiTEOgTMLTINQjgMwQkweAQGCOw0RCoFNbIgGAQEB X-IPAS-Result: A0CFAAD2dTlXiClSfUpehAx+pyWHNosLAQ2Bdh6FcwKBIzgUAQEBAQEBAQERAQEBCAsLCR8xgi2CFgEBBAsHEQgHAQ0BGxwBAQMMBgULDwIFFgsCAgkDAgECAREMAQQBBQEDARgGAQwIAQEXB4dyAQECFwQKnk+BMT4xizuBagSCVAWBXIUsChkEChkNUoNVAQEBAQEBAQEBAQEBAQEBAQEBARYCAQUQcYMaggqETYc/gj0cBZgngVaEKIggiTEOgTMLTINQjgMwQkweAQGCOw0RCoFNbIgGAQEB X-IronPort-AV: E=Sophos;i="5.24,626,1454972400"; d="scan'208";a="177913195" Received: from mail-wm0-f41.google.com ([74.125.82.41]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 16 May 2016 09:30:25 +0200 Received: by mail-wm0-f41.google.com with SMTP id e201so89680265wme.0 for ; Mon, 16 May 2016 00:30:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=reply-to:subject:references:to:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=OTsfkoSzRxsfFa3CjjomPjxLQ5qkN0USiUg9u8ssHJk=; b=ES0uJvyz700w9AuWs3qFAGoY8s6OFSg6djt+xoShc3u9jwPUYeu0xIDeYhdB7Oi1UZ Uh0Z4WCa1p1jeriG8Plk3t6JdxqCOx6OzLwa5ZSE8vhI3xqVkHjbBmAPoE2zfrAMwj4o TdPWO/+0qpQe8oyx9/ArHrdyMcUoKAJt5/yPWghRyqLOzuu6RaZWC4/NDRsgain+IRzg V98GBpatFNrKVxqHaZiLlP0VpHYFWHr5TS1CmI7YLHDMN2rdUL5oC4yDA5s9Lc2dYiGW JvHjYHr3BGZfjh++lEi1LsSrTivYxNglvzP1lKmQtXnT0lIgch++TksUx6mCShA1mu90 t5LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:reply-to:subject:references:to:cc:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=OTsfkoSzRxsfFa3CjjomPjxLQ5qkN0USiUg9u8ssHJk=; b=P0JzlZazwQ7OHlOmSgKJub9yZjdcbPmWCyLAvA4AyFV0dgaK9nNWaRAzQCEKylwPiD tlTKrSBpZks8BRE+o9EpZ1RvyFUu+8DY1mjS+F5La5BVXMz8karbZuygTaZjkRrlHkhD WSovZ0/eHWEhw6NYJGfHl6/eNaYpR2/8vZeAK1keX/tWRbV16g41Zrzy9NYQ55woNYf+ lW4de19YyInQMhgi6Um5fuXoispVc4r4hwgPa3zdbAvgy0t4LpoDMOgxyMS41sIMFJZJ Beynjfo6tA4Ibb2/JKz2/0/sQyTXrKIlZ4NtYritApnW2PwC9EaLRtxZzKKBbG/i6p7E MFrg== X-Gm-Message-State: AOPr4FXW7CYwnI110Jnt3lzwb8qvDGVL2TBh5m+YhOf65yVhGP4ZOdenapNEWzwIYfhIDQ== X-Received: by 10.194.172.228 with SMTP id bf4mr27873881wjc.123.1463383825719; Mon, 16 May 2016 00:30:25 -0700 (PDT) Received: from [172.17.1.79] (papillon.metalscan.fr. [178.22.148.54]) by smtp.gmail.com with ESMTPSA id e8sm32242616wjm.23.2016.05.16.00.30.24 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 May 2016 00:30:24 -0700 (PDT) Reply-To: matthieu.dubuget@gmail.com References: <572FBB68.1010506@allanwegan.de> <57324CE0.5040006@allanwegan.de> <57325BF1.3020102@gmail.com> <57327D2D.7090608@allanwegan.de> <20160511134316.GA24303@topoi.pooq.com> <20160515164248.GA28956@notk.org> To: Adrien Nader , Andreas Rossberg Cc: caml-list From: Matthieu Dubuget Message-ID: <5739770F.2010209@gmail.com> Date: Mon, 16 May 2016 09:30:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160515164248.GA28956@notk.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Ocaml and Windows' notion of Unicode file names Le 15/05/2016 18:42, Adrien Nader a écrit : > There was a thread about this back in february: > "Looking for a windows ocaml UTF-16 encoded filename aware library". > Hello, the thread pointed by Adrien lists different solutions. One of them is to write a lightweight unicode-aware library. A cleaner solution is also currently proposed as a pull request against OCaml standard library (https://github.com/ocaml/ocaml/pull/153). I tried the "small library" solution, which worked pretty well, but in my use-case, it appeared to be extremely slow. I did not yet test a mixed solution, that would switch to unicode versions of the calls, only when the non-unicode one are failing. Nor did I tried yet the pull request #153. Note that on windows, there are two different problems to address when dealing with paths. The more obvious one is their encoding. But you may also experience problems depending on their length. In this case, the solution is to use unicode-aware calls, and to specify an extended-length path, using the "\\?\" prefix. For example, "\\?\D:\very long path". I also have to check if this is slower. Salutations -- Matthieu Dubuget