Questions tagged [nsstringencoding]

Enumeration in Objective-C Cocoa API that contains type for string encoding

Enumeration in Objective-C Cocoa API that contains type for string encoding

127 questions
1
vote
1 answer

NSRegularExpression (iOS)

A have a little problem with parsing HTML into string. I have a big string and I need delete characters between "script" tag. Something like this : Some text here So I need to delete "Some text here". I think it would be…
1
vote
1 answer

How to replace the \u00e2\u0080\u0099 this string into ' in iOS

I got a value from server and i stored it in NSString object. In that string "'" is replaced with \u00e2\u0080\u0099. I tried to replace this by using replaceOccurencesOfString. But it shows an error. Herewith i displayed my code and error. …
Muthu Sabarinathan
  • 1,198
  • 2
  • 21
  • 49
1
vote
3 answers

Unable to create NSUrl from NSString always getting nil

NSMutableString *string = [[NSMutableString alloc]initWithString: @"http%3A%2F%2Fsupport24hour.com%2Fworkplace2%2Fbuttler%2Fimage.php%3Fwidth%3D534%26height%3D256%26image%3Duploads%2Fdeals%2FdealImage%2Fdeal_1383005121_IGA+Logo.JPG"]; [string…
Alok Singh
  • 896
  • 6
  • 18
1
vote
5 answers

Convert string from special character

I am getting info using social framework and getting facebook info, when i get username in another language i.e Denis then it give me like "\U00e6\U00f8\U00e5", how to convert this string to readable string i.e Denis?
Harin
  • 867
  • 11
  • 23
1
vote
0 answers

NSString plain encoded with NSASCIIStringEncoding to NSData

I packed an object (NSObject) to (NSData) and then encoded it with (NSASCIIStringEncoding) for sending it to a SQLite database with this code: NSData *data = [NSKeyedArchiver archivedDataWithRootObject:canvasView.trazoYorch]; //convert NSData…
Jesús Ayala
  • 2,743
  • 3
  • 32
  • 48
1
vote
1 answer

Shortening a URL containing & parameters

i have this URL and I am trying to shorten it through bit.ly API. Here is my code NSString *url = @"http://www.example.com&username=abc&password=123&mode=offline"; NSString *requestStr = [NSString…
Swati
  • 1,417
  • 1
  • 15
  • 35
1
vote
2 answers

How to get the Ascii value from Unicode string U+20B9 to get the indian rupee symbol?

How to get the Ascii value from Unicode string U+20B9 to get the indian rupee symbol?we have tried to use Locale Identifier but it is giving Us Dollar.How to get this done?
1
vote
1 answer

iOS comparing english with german characters

I am using string search "rangeOfString" method available in NSString class. If the string to search and the search string both are in English, I'm able to perform the search perfectly. But if the search string has german characters like umlauts and…
Satyam
  • 15,493
  • 31
  • 131
  • 244
1
vote
3 answers

iOS - XML to NSString conversion

I'm using NSXMLParser for parsing XML to my app and having a problem with the encoding type. For example, here is one of the feeds coming in. It looks similar to this" \U2026Some random text from the xml feed\U2026 I am currently using the…
Romes
  • 3,088
  • 5
  • 37
  • 52
1
vote
2 answers

How to display tamil characters into UITextView from .rtf/.doc file

This is my .rtf file which i included into resources folder of my Xcode project Code which i used for displaying contents of .rtf file into UITextView NSString *filePath=[[NSBundle mainBundle]pathForResource:@"sample" ofType:@"rtf"]; …
Yuva
  • 125
  • 3
  • 11
1
vote
0 answers

How to convert Special Characters ˚˚¬…ˆøππªˆ¨¥¨∆˚ˆøø to ASCII value

How can i convert Special Characters to ASCII i am using this to convert code int asc = [actualString characterAtIndex:0]; label.text = [NSString stringWithFormat:@"%d", asc]; but i am not able to convert the special characters…
user1133747
0
votes
1 answer

ios convert NSString with special chars to const char

i m trying to draw a string with CGContextShowTextAtPoint. CGContextShowTextAtPoint only accepts "const char" as a string input. my problem is that some of the strings have special chars like ä,ö,ü etc in them. if i convert this strings to a "const…
jacksbox
  • 911
  • 1
  • 11
  • 24
0
votes
1 answer

Does NSUTF16LittleEndianStringEncoding make a byte array

I need to encrypt a string. The service that I am sending it to requires that it be an MD5 hash of the byte array of the string in UTF16LE. Basically: if I have myString that needs to be put into a UTF16LE byte array, and then that array needs to…
addzo
  • 845
  • 3
  • 13
  • 37
0
votes
2 answers

NSOrderedSame not YES even though values in NSLog are equal

I have a simple but strange problem. I compare to strings, (taken from different xmls), to find out if they match. If i trace the variables via NSLog, they LOOK the same, but obviously are not. So i guess it's got to do something with its encodings,…
Wolfgang Müller
  • 205
  • 1
  • 4
  • 16
0
votes
1 answer

Objective-C: How can I decode a unicode character back to a string?

I encode a string using NSUTF32BigEndianStringEncoding like this: NSString *utf32BigEndianString = [[NSString alloc] initWithFormat:@"%@", [text dataUsingEncoding:NSUTF32BigEndianStringEncoding]]; For example, this would give me the unicode…
Protocole
  • 1,733
  • 11
  • 28
  • 42
1 2 3
8 9