use TextEncoding for string<->ArrayBuffer

requires text-encoding js polyfill, for now
rmdebug
install text-encoding polyfill