So here is the problem.
I have a line
-0.fb2
NSString 16 method length return
After storing a row in Core Data (backend-sqlite)
The length of the NSString method returns 17, but visually the string remains the same
-0.fb2
And obviously, the isEqualToString method: return NO
After spending a lot of time in the experiments, I am sure that the problem lies in this letter:
Removing this issue resolves the issue.
But that keeps me crazy, why is something like this happening?
Here's a workaround that works but doesn't satisfy me:
- stringByReplacingPercentEscapesUsingEncoding: - you need to convert the string directly to and after the db request
- transliterate an entire line - kinda hack
And here is the workaround that dosnt works:
Please help me understand what happens to a string after saving to Core Data.
And is there a more elegant decision I made?
source share