I have a varchar column in an sqlite datbase. A particular row of text has a backslash, which is used with "\n" for a carriage return in a UITextView. When the value is read from the database via a SELECT:
myobject.text = [NSString stringWithUTF8String: (char *)sqlite3_column_text(selectstmt, 2)];
The backslash is escaped and looks like:
"\\n" rather than "\n"
which doesn't interpret as a carriage return. If I add two blackslashes in the text, the second will also be escaped and eventually leads to an exception when the textview is added as a subview:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key test.'
Is there a way to prevent these escapes or will I need to clean it up manually?