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
0
votes
1 answer

Trouble with string encoding and emoji

I've got some trouble to retrieve some text message from my server, especially with the encoding. Messages can be from many languages (so they can have accents, be in japanese,... ) and can include emoji. I'm retrieving my message with a JSON with…
zbMax
  • 2,756
  • 3
  • 21
  • 42
0
votes
2 answers

Determining Issue With Retrieving JSON from URL in iPhone

Let me start off by saying that I am not particularly trying to find a solution, just the root cause of the problem. I am trying to retrieve a JSON from a url. In browser, the url call works just fine and I am able to see the entire JSON without…
bmjohns
  • 6,344
  • 1
  • 33
  • 39
0
votes
3 answers

Weird error with NSString: No known class method for selector 'stringWithBytes:length:encoding:'

I am attempting to use scanf to assign a value to an NSString, as per the answers to this question by Omar. This is the code, taken straight from progrmr's answer: char word[40]; int nChars = scanf("%39s", word); // read up to 39 chars…
James Dunn
  • 8,064
  • 13
  • 53
  • 87
0
votes
2 answers

NSString from NSData always null

I would like to sign a request with HMAC SHA512, but I seem to mess up encoding and decoding from and to NSData and NSString. I desperately tried to figure out what is wrong, but I just don't seem to get it right. PSEUDOCODE: function…
the_critic
  • 12,720
  • 19
  • 67
  • 115
0
votes
1 answer

NSString to UTF8 is wrong iOS

I'm trying to convert "á" in UTF8. I can find that "á" in UTF8 is "á". In Xcode I've written this: const char * litter = [@"á" UTF8String]; NSLog(@"%s",litter); And it always prints "√°" and that is wrong! Indeed if a write const char * litter =…
Georgevik
  • 539
  • 1
  • 5
  • 18
0
votes
1 answer

%2C URL causing iOS app crash

I have an iOS application which downloads a JSON feed from this URL: https://www.googleapis.com/youtube/v3/activities?part=snippet%2CcontentDetails&home=true&maxResults=50&access_token=%@ I am storing the URL in a NSString for later use. I am also…
Supertecnoboff
  • 6,406
  • 11
  • 57
  • 98
0
votes
1 answer

How to get the proper URL from this tag value?

How to get the proper url link from the tag value. I have used NSXMLParser for parsing and parsed content successfully but stucked with the url value like: http://example.site.com/%3Ca%20href%3D%22/taxonomy/term/3%22%3ETheater%3C/a%3E…
0
votes
2 answers

objective - c lowercaseString

special characters in lowercase letters in a word, failing. sample: NSLog(@"%@",name); name = [name lowercaseString]; NSLog(@"%@",name); 2013-06-24 23:32:11.590 Player[12739:907] BİLİYORSUN.. 2013-06-24 23:32:11.590 Player[12739:907] …
user2512558
  • 21
  • 2
  • 7
0
votes
1 answer

Convert and Display the UTF8 Encoded String

I have a JSON response which i want to store in DB and display in text view or edit text. This json response is encoded by UTF-8 format. Response is somthing like "currencies": [[0,"RUR","…
Krishnakant Dalal
  • 3,568
  • 7
  • 34
  • 62
0
votes
1 answer

Objective C URL with Vertical pipes/bars

I am trying to have vertical pipes in the URL Input String: http://testURL.com/Control?command=dispatch|HOME|ABC:User Name -(NSString *)getURLEncodedString:(NSString *)stringvalue{ NSMutableString *output = [NSMutableString string]; const unsigned…
Mobilewits
  • 1,743
  • 4
  • 21
  • 34
0
votes
2 answers

Insert UNICODE HAIRSPACE character into NSString

i'm trying to add a UNICODE character to NSString in this ways: NSString *euFormatted = [NSString stringWithFormat:@"\u200A%@",self.eu]; or unichar hairspaceChar = 0x200A; // hairspace symbol NSString* hairSpace = [[NSString alloc]…
Denis Bulgarini
  • 143
  • 3
  • 11
0
votes
1 answer

stringByAddingPercentEscapesUsingEncoding adds unexpected characters?

I'm having a hard time getting my NSURL to work, when I create the final string before converting to URL it adds unwanted character to the end of the string, why is this happening and how can I fix it? Here is my code: NSString *remotepathstring =…
Bogiematch
  • 27
  • 7
0
votes
0 answers

CFStringRef from char* without providing encoding type

I have a C string: unsigned char* contents = readInFile(path); //sting bytes in some unknown NSStringEncoding encoding. I want to know the current NSStringEncoding value of contents. I want to do this without using NSString usedEncoding methods. I…
ADude
  • 345
  • 5
  • 14
0
votes
1 answer

Convert special character like $ to hexadecimal

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…
Prateek Chaubey
  • 653
  • 2
  • 10
  • 24
0
votes
0 answers

Incorrect NSStringEncoding - compatiblity (sic) mapping

I'm using Xcode 4.6 with a Cocoa project, using 10.8 SDK, deploying for 10.6. Using LLVM 4.2. My log file is being littered with the following error: Incorrect NSStringEncoding value 0x0000 detected. Assuming NSASCIIStringEncoding. Will stop this…
Womble
  • 4,607
  • 2
  • 31
  • 45
1 2 3
8 9