0

I've got strings that store UTF-16 and UTF-32 unicode value :

NSMutableString *utf16String = [[NSMutableString alloc] init];
[utf16String setString: @"F000"]; //U+F000

NSMutableString *utf32String = [[NSMutableString alloc] init];
[utf32String setString: @"F0000"]; //U+F0000

I want to convert these strings into UTF16Char and UTF32Char in hexadecimal value to obtain the same result as :

UTF16Char utf16Char = 0xF000;
UTF32Char utf32Char = 0xF0000;

Thanks in advance for your help

  • Possible duplicate of [Convert UTF-8 encoded NSData to NSString](http://stackoverflow.com/questions/2467844/convert-utf-8-encoded-nsdata-to-nsstring) – brnrd Feb 27 '16 at 12:48
  • No it's not a duplicate. I want NSString to UTF16Char, not NSData to NSString. – Jeff Dolphin Mar 11 '16 at 12:40

0 Answers0