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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id DDD787EE79 for ; Sun, 15 May 2016 14:39:59 +0200 (CEST) IronPort-PHdr: 9a23:WksiyBKxyDGrCmnMkNmcpTZWNBhigK39O0sv0rFitYgUL//xwZ3uMQTl6Ol3ixeRBMOAu6MC0bad6P6ocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC3oLti6vppdX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqz/e+E8TKdERGAtOmUxocnqrgXrTA2V53JaXH9AwTRSBA2QxRf2RJr4qWPAsfFm0iSAMoWiV7cvQj6v9ahDTQfpzTwYLHg+6m6B2Z84t75SvB/0/083+IXTeozAbPc= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=rossberg@mpi-sws.org; spf=Pass smtp.mailfrom=rossberg@mpi-sws.org; spf=None smtp.helo=postmaster@hera.mpi-klsb.mpg.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rossberg@mpi-sws.org) identity=pra; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="rossberg@mpi-sws.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rossberg@mpi-sws.org designates 139.19.1.49 as permitted sender) identity=mailfrom; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="rossberg@mpi-sws.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@hera.mpi-klsb.mpg.de) identity=helo; client-ip=139.19.1.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rossberg@mpi-sws.org"; x-sender="postmaster@hera.mpi-klsb.mpg.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DRAQDObDhXkDEBE4tdhQq5c4F2hhECgVASAQEBAQEBAQERAQEBAQkLCQkhL4ItghYCBCMdAQE4DwkcAiYCAlcGiEIEjXacNmeEQQEBBYwFAQEIAQEBAQEBGQiBAYcaihYrghIcmCyBL5YqhV6PQSYBgjQegVdsiAYBAQE X-IPAS-Result: A0DRAQDObDhXkDEBE4tdhQq5c4F2hhECgVASAQEBAQEBAQERAQEBAQkLCQkhL4ItghYCBCMdAQE4DwkcAiYCAlcGiEIEjXacNmeEQQEBBYwFAQEIAQEBAQEBGQiBAYcaihYrghIcmCyBL5YqhV6PQSYBgjQegVdsiAYBAQE X-IronPort-AV: E=Sophos;i="5.24,622,1454972400"; d="scan'208";a="218346032" Received: from infao0809.mpi-klsb.mpg.de (HELO hera.mpi-klsb.mpg.de) ([139.19.1.49]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 15 May 2016 14:39:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mpi-sws.org; s=mail200803; h=To:References:Message-Id:Content-Transfer-Encoding:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=Fri7Qhf9r9YmJsIjbQS/7V9ci/N6WX3AzlGjwPTdx0Y=; b=ZxeSD1ajkW5hG1kpwXPuyHv6QYRh4HqpccEAgJcMfeSnjfuhkEI/HXR8MOhdDo0BxnQbbGiyZIXig/mx3lUHEb0xYVv3pHQallmuuFxVtAabcTpIF7wy1iX916/WZWYONj0CY1+psaOJ/QowgixnvkX/1qysznI8uNHx2LPV0k8=; Received: from maniac.mpi-klsb.mpg.de ([139.19.1.28]:60361) by hera.mpi-klsb.mpg.de (envelope-from ) with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) id 1b1vKu-0007y2-Du; Sun, 15 May 2016 14:39:58 +0200 Received: from 109.125.107.239.dynamic.cablesurf.de ([109.125.107.239]:53278 helo=macbook-air.fritz.box) by maniac.mpi-klsb.mpg.de (envelope-from ) with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) id 1b1vKt-0005RX-TI; Sun, 15 May 2016 14:39:55 +0200 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Andreas Rossberg In-Reply-To: Date: Sun, 15 May 2016 14:39:53 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <572FBB68.1010506@allanwegan.de> <57324CE0.5040006@allanwegan.de> <57325BF1.3020102@gmail.com> <57327D2D.7090608@allanwegan.de> <20160511134316.GA24303@topoi.pooq.com> To: caml-list X-Mailer: Apple Mail (2.3124) X-MPI-Local-Sender: true Subject: [Caml-list] Ocaml and Windows' notion of Unicode file names Does anybody have advice for dealing with unicode file names under Windows?= In particular, my problem is that the following invariant let files =3D Array.to_list (Sys.readdir =E2=80=9C.=E2=80=9D) in assert (List.for_all Sys.file_exists files) does not hold under Windows, because some of the file names returned by rea= ddir are not valid. The Unix emulation module has the same issue. This is only partially Ocaml=E2=80=99s fault =E2=80=94 I see that it implem= ents Sys.readdir and Unix.readdir using Windows=E2=80=99 ASCII _findfirst a= nd _findnext functions, which apparently just replace large code points wit= h =E2=80=98?=E2=80=99. And I=E2=80=99m not sure how realistic it would be f= or Ocaml to switch to Windows' wchar APIs and, say, UTF8-encode/decode file= names on its side. But anyway, I=E2=80=99m wondering who else has run into this, and has an id= ea how to cope. Because I came up blank. Thanks, /Andreas