So here is a problem.
I have a string
Белый Клык-0.fb2
NSString method length return 16
After save string in Core Data (backend - sqlite)
NSString method length return 17, but visually string stay the same
Белый Клык-0.fb2
And obviously method isEqualToString: return NO
After spent a lot of time in experiments, i am fugure out that problem is this letter:
й
Removing this letter solve problem.
But it is keeping driving me crazy, why something like that is happening?
Here workaround that works, but dont satisfy me:
- stringByReplacingPercentEscapesUsingEncoding: - need to convert string right in and after db query
- transliterate whole string - kinda hack
And here workaround that dosnt works:
- stringWithUTF8String
- Converting escaped UTF8 characters back to their original form
Please help me understand what is going on with string after save in Core Data.
And there is more elegant solution that i did?