0

I am working on an iOS application. In this application I am trying to convert NSString to hexadecimal. But in some cases NSString contains special $, ¥, etc. This is where I am facing problem. These characters don't convert to hexadecimal.

Is there any way to convert special characters to hexadecimal?

nhahtdh
  • 55,989
  • 15
  • 126
  • 162
Prateek Chaubey
  • 653
  • 2
  • 10
  • 24

1 Answers1

1

Convert the string to NSData

[NSString dataUsingEncoding:]

Then using the data object you can output any base you want: octal, hex, decimal, binary.

John
  • 2,640
  • 1
  • 16
  • 16