NSURLCredential and UTF-8 username
NSURLCredential and UTF-8 username
- Subject: NSURLCredential and UTF-8 username
- From: "Benjámin Salánki" <email@hidden, email@hidden>@lists.apple.com
- Date: Thu, 15 Jul 2010 06:52:38 -0700 (PDT)
- Date-warning: Date header was inserted by spool002.mac.com
Hi List,
I am having problems with NSURLCredential and that the username and password are apparently sent in ISO Latin 1 encoding. At least the guys on the server development side are complaining this is the case.
I did not find any information on how the credential is encoded or if it is possible to change it at all.
The password I am having trouble with is the following: nővér.
I tried making sure the NSURL sent to the NSMutableURLRequest was encoded and escaped properly in UTF-8 and also added charset=utf-8 to the content-type header of the request as I have run out of options where to look.
I even tried to encode my NSString using UTF-8 into an NSData object and then creating a new UTF-8 encoded NSString from this data and set the username and password accordingly, but to no avail.
The strangest thing is if I try to access the password returned when I receive an authentication challenge ([[challenge proposedCredential] password]) it returns a properly formatted string.
Any ideas, pointers are greatly appreciated.
Thanks,
Ben_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden