title: CoreData wrong storing string containing ä, ö, ü, ß
body: <p>I have a problem storing ä, ö, ü, ß characters inside CoreData database, and later on reading them in correct form and displaying in <code>UILabel</code> as text. I am storing as <code>NSString</code> for example "äüß", but I am getting strange characters as result of reading from database. Any idea how to read correct value of <code>NSString</code> property? </p>
  
  <p>UPDATE: </p>
  
  <p>Storing to <code>CoreData</code> Database: </p>
  
  <pre><code>OCDatabaseFloor *floor = (OCDatabaseFloor*) [NSEntityDescription insertNewObjectForEntityForName:FLOOR_ENTITY_NAME inManagedObjectContext:managedObjectContext];
  [floor setFloorName:floorName];
  
  [self saveContext];
  </code></pre>
  
  <p>Save context function is saving changes to database.</p>
  
  <p>Retrieving from database floor object:</p>
  
  <pre><code>NSFetchRequest *fetch = [[NSFetchRequest alloc]init];
  NSEntityDescription *entity = [NSEntityDescription entityForName:FLOOR_ENTITY_NAME inManagedObjectContext:managedObjectContext];
  [fetch setEntity:entity];
  NSPredicate *pred = [NSPredicate predicateWithFormat:@"floorID == %d",[floorID intValue]];
  [fetch setPredicate:pred];
  NSArray *floors = [managedObjectContext executeFetchRequest:fetch error:nil];
  return [floors objectAtIndex:0];
  </code></pre>
  
  <p>And class OCDatabaseFloor: </p>
  
  <pre><code>@interface OCDatabaseFloor : NSManagedObject
  
  @property (nonatomic, retain) NSNumber * floorID;
  @property (nonatomic, retain) NSString * floorName;
  @end
  </code></pre>