toLocal8bit instead of toUtf8
build as a library.