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 6831203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:42:36+00:00 2026-05-26T22:42:36+00:00

I am working on an app that gets a bunch of descriptions through xml

  • 0

I am working on an app that gets a bunch of descriptions through xml and then after parsing puts them on the screen. I’m having a problem with some of the descriptions with apostrophes turning into question marks. What I mean is, they start out in the xml, on the output screen and in the database I get them from as an apostrophe, but then it shows up on the app as a Question mark. This doesn’t always happen, but it does with the same descriptions every time. Heres an example:

This is what is in the xml/database

But it won't be easy. 
After a tour of the house, you'll be 

This is what shows up on the app:

But it won?t be easy. 
After a tour of the house, you?ll be

I’m pretty sure that the problem is that the ipad/iphone doesn’t recognize the character that it is receiving…but I have no idea how I would go about fixing it. Here is a my Parser code: I believe the xml is being sent as UTF – 8 encoding.

[whereToGetXML appendFormat:xmlID];
NSURL *URL=[[NSURL alloc] initWithString:whereToGetXML];


NSData *dataFromServer = [[NSData alloc] initWithContentsOfURL:URL];  
NSLog(@"where to get xml is:%@", whereToGetXML);
// Do any additional setup after loading the view from its nib.
NSData *dataWithoutStringTag = [[NSData alloc]init];


NSXMLParser *firstParser = [[NSXMLParser alloc] initWithData: dataFromServer];
[firstParser setDelegate:self];
[firstParser parse];

//Convert the returned parsed string to data using dataUsingEncoding method. HAVE TO HAVE allowLossyConversion:YES or else it will crash on half of the states. 

dataWithoutStringTag =[tempParserString dataUsingEncoding: NSASCIIStringEncoding allowLossyConversion:YES];

NSString *htmlCode = [[NSString alloc] initWithData:dataWithoutStringTag encoding:NSASCIIStringEncoding];
NSMutableString *temp = [NSMutableString stringWithString:htmlCode];


NSData *finalData = [temp dataUsingEncoding:NSASCIIStringEncoding     allowLossyConversion:YES];

NSXMLParser* parser = [[NSXMLParser alloc] initWithData:finalData];
// NSLog(@"Data is:  %@", dataWithoutStringTag);
//NSXMLParser* parser = [[NSXMLParser alloc] initWithData: dataFromServer];

[parser setDelegate: self];
//[parser setShouldResolveExternalEntities:YES];
[parser parse];
[parser release];
  • 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-05-26T22:42:36+00:00Added an answer on May 26, 2026 at 10:42 pm

    It’s presumably because the string isn’t escaped.

    Try adding a backslash before each quotation mark.

    \'message\'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an app that grabs and installs a bunch of updates off
I'm working on a utility web app that to help manipulate some domain-specific XML
Wrote a small app that accesses a bunch of search websites and puts the
I'm keeping my self busy working on app that gets a feed from twitter
I'm working on an iPhone app that gets a number of objects from a
I working on a universal iOS app that gets news from an RSS feed.
I'm working on an app that requires no user input, but I don't want
I'm working on an app that needs to intercept when a program tries to
I'm working on an App that talks to a serial port, and on my
I'm working on an app that needs to accept a RegEx from the user,

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.