[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [ANN] Working with UTF-8 filenames on Windows in pure Lua
- From: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Fri, 18 Jan 2019 00:44:31 +0300
If you are creating portable Lua script (Linux/Windows/MacOS)
then you have a problem: standard Lua functions such as "io.open"
expect a filename encoded in UTF-8 on all "normal OS",
but on Windows a filename must be in some Windows-specific encoding
depending on the locale.
There is a pure Lua solution to this problem.
This module checks OS, and if Windows is detected,
all filename-related standard Lua functions (they are 11)
are modified to accept filenames in UTF-8.