caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Matthieu Dubuget <matthieu.dubuget@gmail.com>
To: Adrien Nader <adrien@notk.org>, Andreas Rossberg <rossberg@mpi-sws.org>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocaml and Windows' notion of Unicode file names
Date: Mon, 16 May 2016 09:30:23 +0200	[thread overview]
Message-ID: <5739770F.2010209@gmail.com> (raw)
In-Reply-To: <20160515164248.GA28956@notk.org>

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


  reply	other threads:[~2016-05-16  7:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08 22:19 [Caml-list] IDE like PyCharm Allan Wegan
2016-05-09  8:08 ` Francois Berenger
2016-05-09  8:24   ` vrotaru.md
2016-05-09  9:44   ` Jean-Marc Alliot
2016-05-09 11:48 ` Ivan Gotovchits
2016-05-10 21:04 ` [Caml-list] IDE like PyCharm - Results Allan Wegan
2016-05-10 21:57   ` Benjamin Greenman
2016-05-10 23:16     ` Allan Wegan
2016-05-11  6:44       ` Vu Ngoc San
2016-05-10 22:08   ` Bahman Movaqar
2016-05-11  0:30     ` Allan Wegan
2016-05-11  6:16       ` David Allsopp
2016-05-11  6:51         ` vrotaru.md
2016-05-11 11:19         ` Allan Wegan
2016-05-11 11:23           ` Kakadu
2016-05-11 13:13           ` David Allsopp
2016-05-11 13:43       ` Hendrik Boom
2016-05-11 13:55         ` Ivan Gotovchits
2016-05-15 12:39           ` [Caml-list] Ocaml and Windows' notion of Unicode file names Andreas Rossberg
2016-05-15 16:42             ` Adrien Nader
2016-05-16  7:30               ` Matthieu Dubuget [this message]
2016-05-17 13:01                 ` rossberg
2016-05-11  6:54   ` [Caml-list] IDE like PyCharm - Results Leonardo Laguna Ruiz

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=5739770F.2010209@gmail.com \
    --to=matthieu.dubuget@gmail.com \
    --cc=adrien@notk.org \
    --cc=caml-list@inria.fr \
    --cc=rossberg@mpi-sws.org \
    /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).