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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:11:37+00:00 2026-06-05T03:11:37+00:00

i have created a plist with strings. Inside the strings i have umlaute, and

  • 0

i have created a plist with strings. Inside the strings i have umlaute, and can’t encode them to be shown correctly. my code looks like this:

NSString *myFile = [[NSBundle mainBundle] pathForResource:@"LevelText" ofType:@"plist"];

    strings = [[NSDictionary alloc]  initWithContentsOfFile:myFile ];
    stringkeys = [strings allKeys];
    NSEnumerator *enumerator = [strings objectEnumerator];

    while (value = [enumerator nextObject]) {
        if(![value isEqualToString:@""]){
            NSString *right = [NSString stringWithCString:value.UTF8String encoding: NSUTF8StringEncoding];

            NSLog(@"Value: %s", right.UTF8String);
        }

    }

i get load the plist into a NSDictionary object and then enumerate through it. I also looked at another example on stackoverflow but it doesn’t work like that. The Umlaut always is represented like that:

anhören

  • 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-05T03:11:39+00:00Added an answer on June 5, 2026 at 3:11 am

    First, get rid of all the extra calls to UTF8String. There’s no reason to convert back and forth.

    while (value = [enumerator nextObject]) {
        if([value length] > 0){ // A little safer approach that is a good habit to get into
            NSString *right = value;
            NSLog(@"Value: %@", right);
        }
    }
    

    If you still see trouble, then verify that LevelText.plist is UTF8 encoded, but I suspect the above will fix the problem.

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

Sidebar

Related Questions

I have created a PLIST. The structure of the PLIST is like this <?xml
I have my shared user defaults plist that looks something like: menuItems (Array) Item
I have a plist structured like this: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC -//Apple//DTD
I have a .plist created at the application launch with the following code (MyAppTableViewController):
i have created a plist file other than the default one that exists. Can
I don't know how I should do this, I have tried using code like:
I have created a plist file which contain a single array which contains four
I am trying to save a .plist I have created into my NSUserDefaults so
I have successfully created an app that reads from a bundled .plist file and
Have created a new property list, and deleted the original .plist (same filename). Deleted

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.