I get response from server in wincp1251 and restkit returns nil to my mapped object strings. I know restKit have a property defaultHTTPEncoding in RKClient(https://github.com/RestKit/RestKit/commit/0ead8a922219ec42ec6dae6ebe59139a1fd589ae), how can I use this and can it helps me?
How to change encoding in Restkit for IOS from Utf8 to Wincp1251
168 Views Asked by Vasili Krasnouski At
1
There are 1 best solutions below
Related Questions in IOS
- Overlapping UICollectionView in storyboard
- Cannot pod spec lint because of undeclared type errors
- Is the transactionReceipt data present in dataWithContentsOfURL?
- UIWebView Screen Fitting Issue
- ZXingObjC encoding issues
- iOS: None of the valid provisioning profiles allowed the specific entitlements
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Slow performance on ipad erasing image
- Swift code with multiple NSDateFormatter - optimization
- iOS 8.3 Safari crashes on input type=file
- TTTTimeIntervalFormatter always returns strings in English
- How do I add multiple in app purchases in Swift Spritekit?
- Setup code for xibs in iOS. -awakFromNb:
- iOS Voice Over only reads out the title of any alert views
Related Questions in OBJECTIVE-C
- How do I customize NSOutlineView to have border color?
- UIWebView Screen Fitting Issue
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Image and Text locations in UIButton
- setting OpenGL version in objective-C
- Setup code for xibs in iOS. -awakFromNb:
- realm db, get parent link of object
- CFBundleDocumentType is not working in myproject-Info.plist file
- UIPopoverPresentationController not rendering properly
- Using Storyboard Reference
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Unexpected CALayer Vertical Flipping on 3D Rotation 'Bounce'
- Setting View orientation to portrait is ignored
- UITextField append / between dates while enforcing character limit
Related Questions in RESTKIT
- In UITableViewCell, UIImageView content repeats after some cells using AFNetworking
- Restkit: including field from request into object mapping
- iOS RestKit POST Response Content type - is not being set properly
- How to recursively load nested objects identified by foreign-key in RestKit?
- RestKit RKObjectMapping.. Nested & throwaway objects
- Restkit fails when I update architecture to arm64
- RestKit create mapping for nested array
- Restkit NSInternalInconsistencyException Unable to add mapping for keyPath
- managed object context nil restkit while unitTesting
- Restkit Authorization Header disappears
- Mapping relationships from JSON array with Restkit
- iOS RestKit: How to make sure POST parameters are encoded in the request URL?
- Core Data fetch predicate nil check failing/unexpected results?
- Rest kit RKMappingOperation app is getting crash very rarely.
- Moxtra Integration Using REST API
Related Questions in NSSTRINGENCODING
- Value of type 'Data?' has no member 'base64EncodedStringWithOptions'
- NSString from NSData always null
- Convert string from special character
- NSString to HEX
- NSOrderedSame not YES even though values in NSLog are equal
- Weird error with NSString: No known class method for selector 'stringWithBytes:length:encoding:'
- NSURL - Correct Encoding for parameters
- Swift `String.Encoding`: `.unicode` vs `.utf16`
- Converting NSData to NSString without encoding
- Swift: Converting from _PFEncodedString to String (export of Core Data attributes using JSONEncoder)
- How to remove the last unicode symbol from NSString
- Casting NSString to NSData
- MySQL to PHP to NSData to NSString - Where has my UTF8 encoding gone wrong?
- A single "|" character in the URL breaks loading contents of URL
- How to replace the \u00e2\u0080\u0099 this string into ' in iOS
Related Questions in RESTKIT-0.24.X
- Can't map received object after a POST
- RestKit: Can pathPattern have multiple IDs (Object Attributes + Object Relationship Attributes)
- RestKit how to map an array inside an array
- How to map a local JSON string into an object using RestKit 0.24 with RKObjectMapping?
- server is not receiving body object from webservice call of restkit
- Restkit [operation waitUntilFinished] not working
- Restkit, Swift, Core data one to many
- Conflicting SharedInstance during method call with different instance (RestKit)
- Restkit update from 0.20.0 to 0.24.0 addFetchRequestBlock missing
- Error Domain=org.restkit.RestKit.ErrorDomain Code=-1011 "Expected status code in (200), got 504" - Only in real Device
- How to change encoding in Restkit for IOS from Utf8 to Wincp1251
- Restkit: Stubs for foreign key relationships
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I'm assuming that your server is returning JSON. If this is the case then the server needs to be updated because it isn't conformant to the JSON spec. Specifically:
An important point to note is that RestKit doesn't unpack the response into a string, because the JSON deserialisation takes a data object (
NSJSONSerialization). And again, the spec states:So to handle your server response, if you can't change it, you'll need to handle the download yourself, convert the data to the appropriate encoding, unpack the JSON, and then create a mapping operation to use that.