[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Support for Windows unicode paths
- From: David Given <dg@...>
- Date: Wed, 22 Jul 2009 16:44:10 +0100
Bulat Ziganshin wrote:
[...]
just adding encoding/decoding layer is probably impossible since
open/popen/... on windows uses OEM/ANSI encoding by default, and
encoding from utf-8 to oem/ansi is lossy
It's worse than you think. On Windows, the ANSI file system APIs have a
much shorter maximum path length than the UTF-16 ones! Read this:
http://subversion.tigris.org/faq.html#long-paths
So a naive mapping of the Lua functions to the corresponding Windows
ones is not necessarily going to work --- it's entirely possible to be
in a situation where just calling getcwd() fails.
Ditching the ANSI APIs completely and using the UTF-16 ones entirely is
probably the best way to go, unfortunately...
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan