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

  • SEARCH
  • Home
  • 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 8933577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:34:21+00:00 2026-06-15T09:34:21+00:00

I retrieve names from the database and store their first and last name in

  • 0

I retrieve names from the database and store their first and last name in an NSMutableDictionary and store those in an NSMutableArray. In the database I have names that have special characters, such as
‘ñ’, ‘Ç’ and of sorts and when I store the name in a variable, it stores , which crashes my program.

I don’t want to restrict the user input, so I have to keep these characters. But is there a work around to retrieving these names with such characters without getting for output?

ConDAO *con = [[ConDAO alloc] init];

NSMutableArray *resultSet = [con executeMySqlCommand:[NSString stringWithFormat:(Long query here)]];

NSMutableDictionary * endList = [[NSMutableDictionary alloc] init];
[endList setObject: @"" forKey:@"surname"];
[endList setObject: @"" forKey:@"name"];

resultSet =(NSMutableArray *)[resultSet arrayByAddingObject:endList];

for (int i =0; i< [resultSet  count]-1; ++i)
    {
        NSMutableDictionary *temp = (NSMutableDictionary *) [resultSet objectAtIndex:i];

...
}

-(NSMutableArray *) executeMySqlCommand: (NSString *) mysqlCommand{
    LoginData* loginData=[self dataObject]; 
    NSString *post =[NSString stringWithFormat:@"username=%@&password=%@&mysqlCommand=%@",
                     loginData.loginName, loginData.loginPassword, mysqlCommand ];
   NSString *hostStr = @myIP;

    hostStr = [hostStr stringByAppendingString:post];
    NSString *encodeURL =[hostStr stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding];

    NSData *dataURL =  [NSData dataWithContentsOfURL: [ NSURL URLWithString: encodeURL ]];    

    NSString *serverOutput = [[NSString alloc] initWithData:dataURL encoding: NSASCIIStringEncoding];

    if ([serverOutput length]<=0) return nil;
    NSError * error;
    NSMutableArray *data = [NSJSONSerialization JSONObjectWithData:dataURL options:0 error:&error];
    return data;
}
  • 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-15T09:34:22+00:00Added an answer on June 15, 2026 at 9:34 am

    It was actually a problem of using the .php. The encoding that was used did not cover the special characters, so I had to use UTF8 encoding inside the .php when it makes the DB call.

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

Sidebar

Related Questions

I have an ASP.NET DropDownList control that retrieves the first and last name from
I have a mysql database table to store country name and currency symbol -
I retrieve few data from database then store it into hashmap and display it
I have the following database structure (simplified) Store StoreId RateId Products ProductId Name Rates
I was developing an Application that requires a database to store and retrieve data.
I want to retrieve a list of people's names from a queue and, for
How to retrieve data from two tables whose column names are the same?
I am trying retrieve user name from the code through graph api, the below
I'm trying to retrieve folders name from a zip file. I wrote this simple
I am using the Win Api function GetModuleBaseName to retrieve the process name from

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.