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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:41:39+00:00 2026-05-29T04:41:39+00:00

I looked hours to solve this issue, and found nothing. Sorry if answer is

  • 0

I looked hours to solve this issue, and found nothing. Sorry if answer is somewhere on Internet, I really couldn’t find it.

I have a NSString *header = @"ästrç"; or with any other umlauts from German, Swedish, etc languages.

I need this NSString converted to:

const char* cString = [header cStringUsingEncoding: NSASCIIStringEncoding];

Note: NSASCIIStringEncoding, NSMacOSRomanStringEncoding not working.

I also tried this:

const char *cString = [header UTF8String];

Not working.

Can someone help me please? This is very strange.

EDIT:

By “not working” I mean that if I have these chars:
Input

It will output this:
Output

I don’t care of NSLog. I need that const char * for a method to write in PDF:

HPDF_Page_TextOut  (HPDF_Page    page, HPDF_REAL    xpos, HPDF_REAL    ypos, const char  *text)
  • 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-29T04:41:42+00:00Added an answer on May 29, 2026 at 4:41 am

    const char *cString = [header UTF8String] will work, but you are probably testing it with
    NSLog("%s, cString);.

    NSLog will not work, because %s is expecting ASCII string not UTF-8.

    Details: convert NSString to const char *.

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

Sidebar

Related Questions

I've looked for hours for the answer to this seemingly simple issue I'm having.
I have been struggling with this issue for about 10 hours straight. I really
Hey everyone I've looked for hours trying to find a solution to this, my
I have looked around the internet for 3 hours now looking for a solution
I have looked at this for hours and can't seem to figure out what
This is my code that I have looked through for a couple of hours.
I looked at SQL Server dateformat codes but I couldn't find dd.mm.yyyy hh:mm format
I looked in the Rails docs under inflector and found this message... Module deprecated
I have been trying to fix this problem for hours. My app keeps crashing
So I've looked at this use of the freebase API and I was really

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.