Add magic encoding comments

This fixes the issue in which invalid us-ascii characters raise an error.