Simple JavaScript text encoder using an array of numbers.