Better encode of CharSequence