This is an adaptation of https://github.com/Lekensteyn/lua-unicode to work under LuaJIT and for the purpose of Pragtical Code Editor.
- Copy
src/utf8_wrappers.h
andsrc/utf8_wrappers.c
to LuaJITsrc
dir. - Patch
src/luaconf.h
to add the following in the Local configuration part:
#if defined(LUA_LIB) && (defined(lib_aux_c) || defined(lib_io_c) || \
defined(lib_package_c) || defined(lib_os_c))
#include "utf8_wrappers.h"
#endif
- Patch
src/Makefile
to compilesrc/utf8_wrappers.c
:
- lib_buffer.o
+ lib_buffer.o utf8_wrappers.o