{"id":7139,"date":"2013-03-16T13:47:30","date_gmt":"2013-03-16T18:47:30","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=7139"},"modified":"2013-03-18T17:16:37","modified_gmt":"2013-03-18T22:16:37","slug":"nsurl-cannot-handle-unicode-strings","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2013\/03\/16\/nsurl-cannot-handle-unicode-strings\/","title":{"rendered":"NSURL Cannot Handle Unicode Strings"},"content":{"rendered":"<p>I was just <a href=\"https:\/\/twitter.com\/chockenberry\/status\/312328385655357440\">reminded<\/a> of this <a href=\"http:\/\/www.openradar.me\/6923664\">bug<\/a> that Craig Hockenberry reported over four years ago. The regular method for creating a <code>NSURL<\/code> is overly strict, so I&rsquo;ve long been creating them via a category method. I need to modify it to handle Unicode in the domain, too.<\/p>\n<p>Update (2013-03-18): A <code>-[NSURL isEqual:]<\/code> <a href=\"http:\/\/openradar.appspot.com\/radar?id=2865402\">bug from Tim Wood<\/a>:<\/p>\n<blockquote cite=\"http:\/\/openradar.appspot.com\/radar?id=2865402\"><p>NSURL should compare the decoded paths, not the encoded paths so that the %5b vs %5B case difference doesn&rsquo;t spuriously make these URLs seem different.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>I was just reminded of this bug that Craig Hockenberry reported over four years ago. The regular method for creating a NSURL is overly strict, so I&rsquo;ve long been creating them via a category method. I need to modify it to handle Unicode in the domain, too. Update (2013-03-18): A -[NSURL isEqual:] bug from Tim [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,69,31,30,74,71],"class_list":["post-7139","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-cocoa","tag-ios","tag-mac","tag-opensource","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=7139"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7139\/revisions"}],"predecessor-version":[{"id":7170,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7139\/revisions\/7170"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=7139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=7139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=7139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}