Make CharacterSet constants public and add tests.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>