lua-users home
lua-l archive

Re: Is it possible to add utf-8 lua source file support in lua 5.2?

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


Tom N Harris <telliamed <at> whoopdedo.org> writes:
> function utf8_dofile(filename)
> return assert(load(
> function()
> return string.gsub(
> assert(io.open(filename)):read('*a'),
> '^239円187円191円', '')
> end,
> filename
> ))()
> end
Which will close the file at some unspecified time in the not-so-near future and
may lead to "Out of file handles", if called often with no GC betweeen.

AltStyle によって変換されたページ (->オリジナル) /