smart_unicode refactory