lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On my MacOS machine the following character codes match '%s':

"C" locale: 9 10 11 12 13 32

"en_US.UTF-8" locale: 9 10 11 12 13 32 133 160

133 == NEXT LINE (NEL)
160 == NO-BREAK SPACE (NBSP)



On Mon, Oct 22, 2018 at 1:03 PM Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
On Mon, Oct 22, 2018 at 12:33 PM Dirk Laurie wrote:
Is there a standard locale in which character class %s matches the
hardspace character?


Yes, of course.
For example, Russian Windows locale.
 
   Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio
   > os.setlocale""
   Russian_Russia.1251
   > for code = 0, 255 do
   >> if string.char(code):match"%s" then
   >> print(code)
   >> end
   >> end
   9
   10
   11
   12
   13
   32
   160
   >

 
 


--
--