Improve unicode string escape implementation