Sha256: 746fc2d62468de50f85fbf2575f1698e24331c0a4d8f53d17fe79c56c6a22db3
Contents?: true
Size: 761 Bytes
Versions: 7
Compression:
Stored size: 761 Bytes
Contents
## the following magic enables wide characters when used with a ruby ## ncurses.so that's been compiled against libncursesw. (note the w.) why ## this works, i have no idea. much like pretty much every aspect of ## dealing with curses. cargo cult programming at its best. require 'fiddle' require 'fiddle/import' module LocaleFiddler extend Fiddle::Importer SETLOCALE_LIB = case RbConfig::CONFIG['arch'] when /darwin/; "libc.dylib" when /cygwin/; "cygwin1.dll" when /freebsd/; "libc.so.7" else; "libc.so.6" end dlload SETLOCALE_LIB extern "char *setlocale(int, char const *)" def setlocale(type, string) LocaleFiddler.setlocale(type, string) end end
Version data entries
7 entries across 7 versions & 1 rubygems