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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:37:49+00:00 2026-05-27T14:37:49+00:00

I have made an app where I read words from an rtf file File

  • 0

I have made an app where I read words from an rtf file

File is loaded through this code

self.germanpath = [[NSBundle mainBundle]pathForResource:@"german" ofType:@"rtf"];
germanfile = [[NSString alloc]initWithContentsOfFile:germanpath encoding:NSUTF8StringEncoding error:&error];

The files contents are

schockierend knusprig das Schachmatt der Schriftsteller getrocknete
Früchte

When I output the string the characters like ü are printing like getrocknete Fr\'fcchte. Both in app and in NSLog statements it is coming as \'.

Edit

I just tried outputting simply

NSLog(@"schockierend knusprig das Schachmatt der Schriftsteller getrocknete Früchte");

and it worked. So I am stating the method I used to output it; I am outputting word by word

NSString *startfrom = [[NSString alloc] initWithFormat:@"german%i",i];
NSString *word = nil;
NSScanner *scanner = [NSScanner scannerWithString:germanfile];
[scanner scanUpToString:startfrom intoString:nil];
[scanner scanUpToString:@" end" intoString:&word];
NSString *finalword = [word substringFromIndex:[startfrom length]];
Word.font = [UIFont fontWithName:@"DK Crayon Crumble" size:25.0];
Word.text = finalword;
NSLog(@"%@",finalword);
[startfrom 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-27T14:37:50+00:00Added an answer on May 27, 2026 at 2:37 pm

    It’s an RTF file, not a plain text file. Its contents are encoded according to how RTF files are encoded, which involves escaping non-ASCII characters.

    Because there’s no native RTF support on iOS (there is on Mac OS X with NSAttributedString), you would have to roll your own RTF parser in order to read this file. I wouldn’t recommend it. If the RTF file is actually being used to store attributes (such as italic or bold text), you’ll have to go the parser route to convert it to an NSAttributedString or some other format.

    If it’s just plain text (and can therefore be fully represented by a Unicode string) then you should recreate the file as a TXT file using a known encoding (such as UTF-8) and then use -[NSString initWithContentsOfFile:encoding:] to read it.

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

Sidebar

Related Questions

I have made an app that gets an array of addresses from a web
This is my first winform app in .NET... I have made a couple of
I have this application I made on a utility based app. How would I
I have a main branch with a file called app.js . I made changes
I have a MyThread object which I instantiate when my app is loaded through
I have made a birthday reminder application using localNotification. It read the contacts from
I have made a little app for signing up for an event. User input
I have made an update on Google App Engine with a small fix and
I have two UITextFields in the App as IBOutlets and I have made a
I have a ASP.net 2.0 app and I have made some changes the the

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.