Add support to non-ascii characters.

The to_str instead to_s function make it possible to use non-ascii characters.