StrixDB could only handle UTF8 unicode. Be careful of using Lua scripts encoded in UTF8 (without BOM or UTF8 cookie : lua5.1 understand only the luac magic number as BOM).
To check the UTF8 correctness of your scripts (and dynamic HTML Lua pages), we provide a built-in facilities with the webGet module. The function webGet.checkUTF8 checks recursively the given directory and for each file returns OK if the file is correctly encoded (UTF8 without BOM) or BOM if a UTF8 BOM(cookie) is found. Correct only script or html dynamic Lua pages (binary files as images DON'T BE CORRECTED).
C:\StrixDB\release>lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require 'webGet'
> webGet.checkUTF8('scripts') -- replace with your your
script directory
table.foreach(rdf.graph.list(),function(_,g)print(g.uri)end)
The apache module open automatically the RDFstorage (if closed) before interpreting a dynamic Lua page or a Lua script. To use a Lua script from Lua with or without the use of Apache, you could make use on of the two following tricks :
assert(require('StrixStore')) if rdf.isOpen()==false then rdf.open{file='rdfStore.db',uri='http://myURIroot/'} end
or testing existence of the apache table created by mod_strixdb
if apache==nil then assert(require('StrixStore')) rdf.open{file='rdfStore.db',uri='http://myURIroot/'} end