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 4481E7F61E for ; Thu, 2 Nov 2017 12:59:48 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=dra-news@metastack.com; spf=Pass smtp.mailfrom=dra-news@metastack.com; spf=None smtp.helo=postmaster@outmail149077.authsmtp.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.149.77; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of dra-news@metastack.com designates 62.13.149.77 as permitted sender) identity=mailfrom; client-ip=62.13.149.77; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; 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@outmail149077.authsmtp.com) identity=helo; client-ip=62.13.149.77; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail149077.authsmtp.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AzSfEQxfdQUiLfPNpSM2L9//ClGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc6/Yh7h7PlgxGXEQZ/co6odzbGJ4+a9ASQp2tWojjMrSNR0TRgLiM?= =?us-ascii?q?EbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpRZbIBj0NBJ0?= =?us-ascii?q?K+LpAcaSyp3vj6Hhs6HUNiBBmCa8aKhFARO5oQjeO9Mayd9nI7otyxLSr1NBcO?= =?us-ascii?q?EQwnlncxbb1THX78K0tLpi6DgY+/ko8soFVaThY4w5S6ZZBXIoKSF/rJngvBzH?= =?us-ascii?q?CA+O/Wc0U2MMkxMODRKTvz/gWZKkniLkt+Y18S2eJsruVfhgVS6rqqFmVwTAjS?= =?us-ascii?q?obPiUl+WrUzMd3ifQI81qauxVjztuMM8muP/1kc/aYJItCSA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DGAQAwCPtZh02VDT5cHAEBBAEBCgEBg?= =?us-ascii?q?mYgggAnB48JjidDAQEGgTGYVgqFOwKEZ0MUAQEBAQEBAQEBARIBAQEKCwkIKC+?= =?us-ascii?q?COAUBHgEFgjsBAQEBA4EJAgEIGC4yFwENAgQBEggSiXwNAQMBqxqLFwEKAQEBA?= =?us-ascii?q?SODLoIHgQyEJn81hRODQ4IyBZIrj2KUfAyTJpVpAgQLAhqBOTaCDTQhJV6CZIJ?= =?us-ascii?q?sgXN3ixREAYEQAQEB?= X-IPAS-Result: =?us-ascii?q?A0DGAQAwCPtZh02VDT5cHAEBBAEBCgEBgmYgggAnB48Jjid?= =?us-ascii?q?DAQEGgTGYVgqFOwKEZ0MUAQEBAQEBAQEBARIBAQEKCwkIKC+COAUBHgEFgjsBA?= =?us-ascii?q?QEBA4EJAgEIGC4yFwENAgQBEggSiXwNAQMBqxqLFwEKAQEBASODLoIHgQyEJn8?= =?us-ascii?q?1hRODQ4IyBZIrj2KUfAyTJpVpAgQLAhqBOTaCDTQhJV6CZIJsgXN3ixREAYEQA?= =?us-ascii?q?QEB?= X-IronPort-AV: E=Sophos;i="5.44,333,1505772000"; d="scan'208";a="299001049" Received: from outmail149077.authsmtp.com ([62.13.149.77]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2017 12:59:47 +0100 Received: from mail-c245.authsmtp.com (mail-c245.authsmtp.com [62.13.128.245]) by punt22.authsmtp.com. (8.15.2/8.15.2) with ESMTP id vA2BxYNi086314; Thu, 2 Nov 2017 11:59:34 GMT (envelope-from dra-news@metastack.com) Received: from romulus.metastack.com (114.212-105-213.static.virginmediabusiness.co.uk [213.105.212.114]) (authenticated bits=0) by mail.authsmtp.com (8.15.2/8.15.2) with ESMTPSA id vA2BxV8a039609 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Nov 2017 11:59:33 GMT (envelope-from dra-news@metastack.com) Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id vA2BxVX6018861; Thu, 2 Nov 2017 11:59:31 GMT Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0361.001; Thu, 2 Nov 2017 11:59:30 +0000 From: David Allsopp To: =?iso-8859-1?Q?Mattias_Engdeg=E5rd?= , "OCaml List (caml-list@inria.fr)" Thread-Topic: [Caml-list] OCaml 4.06.0+rc1 Thread-Index: AQHTUKwLJbzCcBmSjE2aVPHR48kkHqL8tXfQgAEcUgCAAy8ZYA== Date: Thu, 2 Nov 2017 11:59:30 +0000 Message-ID: References: <09738422-5ADF-43DE-856A-2727515BD2FA@acm.org> In-Reply-To: <09738422-5ADF-43DE-856A-2727515BD2FA@acm.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.232.60.117] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 4a33303d-bfc5-11e7-bb95-9cb654bb2504 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNl8UURhQ KkJXbgASJgVGAnde RXkJW1VTQFxwU2Z8 YQlSIwdcYVRPXwB0 UklLXFNTEBpqBAMA SFhvUGs6EQ0XeH15 Y0ZrEHVfXkA0cRd+ QU1UFjkbNzEzbX0e URVfalEGeQZXd0wX bFV7BiEPZGUDKBgV TUcAFDk0OXBbKT9J d0kqBlsXRQ5XWGZi AUhBBz52dQBW X-Authentic-SMTP: 61633634383431.1039:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 213.105.212.114/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: RE: [Caml-list] OCaml 4.06.0+rc1 Mattias Engdeg=E5rd wrote: > 30 okt. 2017 kl. 19.25 skrev David Allsopp : > > > > One of the big changes for the native Windows ports of OCaml is that > we now have support for UTF-8 filenames in the runtime. > > > > TL;DR functions like Sys.readdir no longer return garbage (or at best > locale-specific strings). >=20 > This sounds like very good news, but just for curiosity, how are > unpaired surrogates in file names handled? (I have no Windows machine > handy.) Does readdir raise an exception, or return useless rubbish, or > somehow encode the surrogates in a form that can be used by other file > handling functions? This is a good question - and indeed is a section I should add to the post.= At the moment, you will get a Sys_error exception informing you that "No m= apping for the Unicode character exists in the target multi-byte code page"= - in other words, the runtime refuses to give invalid UTF-8 in this case.= =20 If you configure OCaml with WINDOWS_UNICODE=3D0 then, as in previous versio= ns, you will get a nonsense string, but no exception. We plan in 4.07.0 to address this but it hasn't been dealt with in this rel= ease mainly because unpaired surrogates in filenames are a highly parasitic= case and also because this issue does not (I believe) only affect Windows. David