[NSURL path] returning nil ?
27/08/06 21:28
When percent escaping some accentued characters in string constants passed to the URLWithString method, the path method returns nil… what's happening here ?
When decoding percent escapes, the NSURL class assumes UTF-8 encoding.
Examples :
à is 0xE0 in ISO-8859-1 and 0x00E0 in Unicode but 0xC3 0xA0 in UTF-8, so encoding in a NSString constant should be @"%C3%A0" and not @"%E0".
Examples :
à is 0xE0 in ISO-8859-1 and 0x00E0 in Unicode but 0xC3 0xA0 in UTF-8, so encoding in a NSString constant should be @"%C3%A0" and not @"%E0".