Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6855919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:49:09+00:00 2026-05-27T01:49:09+00:00

Incorrect NSStringEncoding value 0x0000 detected. Assuming NSStringEncodingASCII. Will stop this compatiblity mapping behavior in

  • 0

Incorrect NSStringEncoding value 0x0000 detected. Assuming
NSStringEncodingASCII. Will stop this compatiblity mapping behavior in
the near future.

When I was using ASIHTTPRequest, I keep getting this error(50% of the times), what’s wrong with it?

I assume the URL I passed in is correct, as it does not contain any space or strange character, maybe it is the result string having some unrecognized character?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:49:10+00:00Added an answer on May 27, 2026 at 1:49 am

    Copying my answer from https://stackoverflow.com/q/8251175/918764

    The error is not that your data isn’t encoded correctly, it’s almost certainly that you’re requesting some kind of string data from an ASIHTTPRequest object that doesn’t have an encoding set yet – this will happen if the request failed to connect to the server, or if the server didn’t send an understandable encoding header.


    This notably happens if you call [asiHttpRequest getResponseString] before a valid response has been returned and the request encoding has been set (i.e. couldn’t connect to server).

    The easiest way to workaround this warning is by editing the ASIHTTPRequest class, remove the @synthesize responseEncoding and adding a simple custom getter/setter so you can return the default encoding if the response encoding isn’t set:

    - (NSStringEncoding) responseEncoding
    {
        return responseEncoding || self.defaultResponseEncoding;
    }
    
    - (void) setResponseEncoding:(NSStringEncoding)_responseEncoding
    {
        responseEncoding = _responseEncoding;
    }
    

    There’s also a more specific workaround for the getResponseString method, which I think is the only place that uses the encoding without checking for a value – since the encoding should be set for any non-zero length response:

    - (NSString *)responseString
    {
        NSData *data = [self responseData];
        if (!data) {
            return nil;
        }
        // --- INSERT THIS BLOCK ---
        // If the 'data' is present but empty, return a simple empty string
        if (data.length == 0) {
            return @"";
        }
        //assert(self.responseEncoding); // if you're into runtime asserts, uncomment this
        // --- END OF BLOCK TO INSERT ---
        return [[[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:[self responseEncoding]] autorelease];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error when I run the application Incorrect syntax near 12 ,
I've got this (incorrect) sample code for getting a value out of stringstream and
this query give me 'Incorrect syntax near the keyword 'select'.' look please below bold
i am getting the following error: Incorrect syntax near 'cast', expected 'AS'. on this
I am getting Incorrect syntax near the keyword 'select' after executing the following code.
I tried this and it returned incorrect rows SELECT `product_id`, `expiry` FROM `products_featured` WHERE
I'm trying to avoid returning an incorrect value when in the catch but I'm
I am getting the method does not exist or incorrect error with this line:
_mysql_exceptions.Warning: Incorrect string value: '\xE7\xB9\x81\xE9\xAB\x94...' for column 'html' at row 1 def getSource(theurl, moved
I have a (semantically incorrect) HTML like this: <ul> <li class=year>2009</li> <li><a href=project1.html>Project 1</a></li>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.