When specifying the C-string format for dumping memory, we treat unprintable characters as signed. Whether a character is signed or not is implementation defined, but all printable characters are signed. Therefore it's fair to assume that unprintable characters are unsigned.
Before this patch, the newly added unit test would print:
"\xffffffcf\xfffffffa\xffffffed\xfffffffe\f”
With this patch, it prints what you would expect:
“\xcf\xfa\xed\xfe\f”
rdar://111126134