Search code examples
iphoneiosloggingerror-log

What's with the dashes in some iOS error messages?


I sometimes see error messages in the log file of my iOS device with at least part of the text containing dashes between each letter, like this:

... ’-t -b-e -c-o-m-p-l-e-t-e-d-. -(-k-C-F-E-r-r-o-r-D-o-m-a-i-n-C-F-N-e-t-w-o-r-k -e-r-r-o-r -2-.-)-" -U-s-e-r-I-n-f-o-=-0-x-1-4-5-f-d-0 -{-k-C-F-G-e-t-A-d-d-r-I-n-f-o-F-a-i-l-u-r-e-K-e-y-=-8-}

I'm just curious as to any meaning this might have (certainly doesn't do much for readability, but I suppose it's easy to spot), or if it's just a random problem. (My device is jailbroken, if that makes a difference).

Update: I was able to format a log message similarly by calling NSLog with a non-ASCII character at the beginning:

NSLog(@"€ Line will be formatted strangely");

Solution

  • I suspect that the message was in UTF16 (or some other double-byte character set) and was incorrectly mapped in as ASCII when converting to an NSString.