Better support for utf-8 character names.

Having some non-ascii character names cause troubles as this mix str and unicode types. This patch save every time in unicode in the json file, so it's more safe.