Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9288209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:51:50+00:00 2026-06-18T19:51:50+00:00

I am new to iOS programming. I am developing an app which gets some

  • 0

I am new to iOS programming. I am developing an app which gets some sentences from my web service which I insert into my local database However, some sentences contain turkish characters such as; “ü, ğ, ç, ö”. I can insert these characters to in my database fine, but when I output them to a UILabel it looks like: “≈ü ƒü √º √∂”. I have tried to convert to NSUTF8StringEncoding but to no avail.

I have an NSMutableArray, named questions, which contains some turkish characters. How can I convert this Array to NSUTF8String format?

Sorry for my bad english 🙂 Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T19:51:51+00:00Added an answer on June 18, 2026 at 7:51 pm

    Ahh, I think the problem is not that you need to convert your array – it is how you display the strings.

    Check this code which has an array of Turkish footballers:

    NSMutableArray *questions = [[NSMutableArray alloc] initWithObjects:@"Emre Belözoğlu", @"Gökhan Gönül", @"Mevlüt Erdinç", @"Nuri Şahin", nil];
    
    const char *utf8string = [[NSString stringWithFormat:@"%@", [questions objectAtIndex:0]] UTF8String];
    self.title = [NSString stringWithUTF8String:utf8string];
    

    It should now display the title of the page as “Emre Belözoğlu” in correct formatting.


    The problem could alternatively be with the way the data is parsed from the SQLite to your NSMutableArray. Here is how I have achieved it for a Formula 1 app.

    In viewDidLoad I call [self loadNamesFromDatabase]; which looks like:

    - (void)loadNamesFromDatabase
    {
        NSString *file = [[NSBundle mainBundle] pathForResource:@"Formula1" ofType:@"sqlite"];
        sqlite3 *database = NULL;
        if (sqlite3_open([file UTF8String], &database) == SQLITE_OK) {
            sqlite3_exec(database, "select driver_id, driver_name, driver_nation, driver_team from drivers", MyCallback, drivers, NULL);
        }
        sqlite3_close(database);
    }
    

    and the MyCallback function you see there is as follows:

    static int MyCallback(void *context, int count, char **values, char **columns)
    {
        NSMutableArray *drivers = (NSMutableArray *)context;
        NSString *columnName;
        NSString *columnValue;
        NSMutableDictionary * record = [NSMutableDictionary dictionary];
        for (int i=0; i < count; i++) {
            columnName = [NSString stringWithUTF8String:columns[i]];
            if (values[i]){
                columnValue = [NSString stringWithUTF8String:values[i]];
            }
            else{
                columnValue = @"";
            }
            [record setObject:columnValue forKey:columnName]; 
        }
        [drivers addObject:record];
    
        return SQLITE_OK;
    }
    

    where drivers is an NSMutableArray. The key thing here is stringWithUTF8String and you would not need to use the code at the top as all data should be encoded properly and thus will be presented correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to iOS programming and is developing an app that requires the user's
I'm new to iphone/ ios programming. I'm developing a simple app to display formatted
I am new to IOS programming. I want to write some data into file.
I'm a new iOS programming and I'm developing a simple iPhone game that needs
I am new to iOS programming.My requirement is to open the Calendar from the
I'm relatively new to iOS programming. I 've made some apps to the 6.0
I am fairly new to iOS programming and have run into a problem I
I am relatively new to iOS and programming, and I made an app before,
I am new to IOS programming. I am starting from the basic application created
I'm fairly new to iOS programming and I'm working on an iPad app that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.