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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:53:05+00:00 2026-05-21T06:53:05+00:00

I have tried googling it but didn’t got the exact answer as required. I

  • 0

I have tried googling it but didn’t got the exact answer as required.

I want to convert a NSString into Byte Array in iPhone.

Also I want to know that Do the result of conversion of NSString to byteArray in iPhone will be same as conversion of string to byteArray in JAVA?

Thanks for your help in advance…

  • 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-21T06:53:06+00:00Added an answer on May 21, 2026 at 6:53 am

    There are many different encodings possible. If you use the same encoding in both Objective-C and in Java, then you should get the same bytes (or string, if you’re going the other way). I’d expect Java to use UTF8, which is specified in Cocoa as NSUTF8StringEncoding.

    There are several methods in NSString for converting a string to a pile o’ bytes. Three of them are: -cStringUsingEncoding:, -UTF8String, and -dataUsingEncoding:. The first returns a char * pointing to a null-terminated array of char. The second does pretty much the same thing as calling the first and specifying UTF8. The third returns a NSData*, and you can access the bytes directly using NSData’s -bytes method.

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

Sidebar

Related Questions

I tried googling, but didn't have success finding tutorials for amazon web service(AWS) with
I have the following two questions, I tried googling these, but didn't find any
This may be a dumb question, I have tried googling but I am probably
I've tried Googling and searching stackoverflow, but have yet to find a solution too
I have tried googling for an way to do this but can't seem to
I've tried persistently googling this error, but to no avail. I currently have these
I am stuck here i have tried googling but couldn't find solution Options +FollowSymLinks
I tried googling. (And MSDN-ing.) I also tried putting text there, but it didn't
I tried googling, but didn't come up with much. I'm building a horizontal carousel
I have tried searching over the internet about this problem but not able to

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.