On Thu, Sep 28, 2017 at 5:19 AM, mathieu stumpf guntz <
psychoslave(a)culture-libre.org> wrote:
According to lua wiki
<http://lua-users.org/wiki/Lua
Locales%20In%20Lua%205.1>, in Lua 5.1 "identifiers [are] locale
dependent, and from the reference manual which states that "[the
documentation] derived from the Lua 5.1 reference manual <
http://www.lua.org/manual/5.1/index.html>"t;", I guess tha Scribunto is
still derived form Lua 5.1.
That's correct.
So, what I would like is being able to set the locale
for a module and use
identifiers with locale characters. But `os.setlocale` isn't accessible in
scribunto modules.
Allowing os.setlocale would very likely cause problems on threaded
webservers where one thread's locale change stomps on another's. It might
even cause trouble for subsequent requests on non-threaded servers if the
locale doesn't get reset, or for other code running during the same request
(e.g. see T107128 <https://phabricator.wikimedia.org/T107128>).
For sanity's sake, on Wikimedia wikis we use C.UTF-8 as the OS-level
locale. This doesn't affect much since MediaWiki usually uses its own i18n
mechanisms instead of using the locale.
--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation