lua-users home
lua-l archive

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


It was thus said that the Great Sean Conner once stated:
> It was thus said that the Great Dirk Laurie once stated:
> > 2014-04-17 18:16 GMT+02:00 Sean Conner <sean@conman.org>:
> > 
> > >   First off, there may be Lua modules that link to iconv [1] so there really
> > > shouldn't be a reason to filter out to that program.
> > 
> > > [1]     Oh, say, here:
> > >
> > >         https://github.com/spc476/lua-conmanorg/blob/master/src/iconv.c
> > 
> > This seems to be the closest any of those modules have come to being
> > announced on this list. Any plans for a 5.1 version? LuaRocks?
> 
>   It's written for 5.1.  And let me see about getting a rock made.  And
> depending upon your view of namespaces, it's actually "org.conman.iconv". 
> Oh, and I requires a C99 compiler.

  Okay, I finally got the rockspec made, it's been uploaded to Luarocks and
best of all, it no longer requires a C99 compiler.  An interface to IConv, a
character set conversion library.  Sample usage:

	iconv = require "org.conman.iconv"
	trans = iconv.open("iso-8859-1","utf-8")
	iso   = "This is \225 test"
	utf   = trans(iso)
	print(utf)
	This is á test

  License is LGPL.  

  -spc