Fix escape misbehavior on basic_string<char>.

Signed entity used for byte comparison, which fails for signed char.
Due to this JSON serialization spits \uXXXX monstrosity instead of
proper UTF-8.