Table encoding fixes

Fixed for encoding chinese characters (among others) - #111