Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the URL string contains Chinese characters, MTLJSONAdapter parsing will crash. #603

Closed
duxinfeng opened this issue Aug 27, 2015 · 1 comment

Comments

@duxinfeng
Copy link

Hi,
Server data

 {
            "url": "http://haojiazhang123.com/pk.html?knowlPoint='加法'&tid=67889",
            "writer": "老师",
            "cover": "http://file.haojiazhang123.com/static/21cb333c-4c66-11e5-8074-00163e000ba7.jpg",
            "time": "2015-08-27 10:48:44"
  }
+ (NSValueTransformer *)urlJSONTransformer{

    return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName];
}

When the URL string contains Chinese characters, MTLJSONAdapter parsing will crash.

Thanks!

@robb
Copy link
Member

robb commented Aug 27, 2015

I believe you need to percent-encode non-ASCII characters in URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants