standards - Which is better — hex escaping or octal escaping? -
i writing program outputs arbitrary binary in utf-8 stream. avoid having invalid utf-8, escaping invalid characters. should use hex or octal escaping?
that is, should hex ffff escaped this:
\xff\xff or this:
\377\377 the first python does, second c does. can't decide.
[edit] need able handle potentially long strings, this:
something something\377\377\377\377\377\377\377\377something vs.
something something\xff\xff\xff\xff\xff\xff\xff\xffsomething
many times in life, when chosing between equals, getting past choice of more benefit value inherent in options themselves.
or, former boss of mine say, "that's non-problem."
Comments
Post a Comment