---
title: "CapitalizedString with Turkish letters"  
description: "CapitalizedString with Turkish letters"  
author: "Allen Scott"  
published: 2014-10-28  
updated: 2014-10-28  
canonical: https://www.mindstick.com/forum/2444/capitalizedstring-with-turkish-letters  
category: "iphone"  
tags: ["iphone", "ios", "ios 4"]  
reading_time: 1 minute  

---

# CapitalizedString with Turkish letters

I have a [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) with Turkish letters.\
I have a [method](https://www.mindstick.com/forum/166/webservice-method) for deserialize the JSON. I'm getting the correct [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) from [web service](https://www.mindstick.com/articles/895/web-service-introduction) and I set it to my object's variable. newsCategory.[name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) contains 'ASKERİ HAVACILIK' which is NSString.\

```
 +(NewsCategory*) convertCategory: (NSMutableDictionary *) jsonDictionary{        NewsCategory *newsCategory = [[NewsCategory alloc] init];        newsCategory.name =[jsonDictionary objectForKey:@"name"];        return newsCategory;    }
```

I have to [convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) 'ASKERİ HAVACILIK' to 'Askeri Havacılık'. So I used capitalizedString for this.\
NSString *capitalizedName = [jsonDictionary objectForKey:@"name"];newsCategory.name = [capitalizedName capitalizedString];But unfortunately, it [shows](https://yourviews.mindstick.com/view/81380/new-york-violent-shooting-shows-people-are-not-safe-in-night-life) @"Askeri̇ Havacilik"How I convert this to **'Askeri Havacılık'** ?\

## Replies

### Reply by Anonymous User

```
NSString *capitalizedName = [jsonDictionary objectForKey:@"name"];NSString *accentedString = capitalizedName;NSString * capitalizedString = [accentedString stringByFoldingWithOptions:NSDiacriticInsensitiveSearch locale:[NSLocale currentLocale]];newsCategory.name =  [capitalizedString capitalizedString];
```

Depending on the nature of the strings you want to convert, you might want to set a fixed locale (e.g. English) instead of using the user's current locale. That way, you can be sure to get the same results on every machine.


---

Original Source: https://www.mindstick.com/forum/2444/capitalizedstring-with-turkish-letters

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
