global.TextEncoder = require('text-encoding').TextEncoder;