{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/30417526","id":30417526,"diff_hunk":"@@ -1280,20 +1280,77 @@ end\n @test isxdigit(\"a\") == true\n @test isxdigit(\"g\") == false\n \n-@test is_valid_ascii(\"is_valid_ascii\") == true\n-@test is_valid_ascii(\"Σ_not_valid_ascii\") == false\n-@test is_valid_char('a') == true\n-@test is_valid_char('\\x00') == true\n-@test is_valid_char('\\ud800') == false\n-\n-@test is_valid_utf16(utf16(\"a\")) == true\n-@test is_valid_utf16(utf16(\"\\ud800\")) == false\n-# TODO is_valid_utf8\n-\n # Issue #11140\n-@test is_valid_utf32(utf32(\"a\")) == true\n-@test is_valid_utf32(utf32(\"\\x00\")) == true\n-@test is_valid_utf32(UInt32[0xd800,0]) == false\n+@test isvalid(utf32(\"a\")) == true\n+@test isvalid(utf32(\"\\x00\")) == true\n+@test isvalid(UTF32String, UInt32[0xd800,0]) == false\n+\n+# Issue #11241\n+\n+@test isvalid(ASCIIString, \"is_valid_ascii\") == true\n+@test isvalid(ASCIIString, \"Σ_not_valid_ascii\") == false\n+@test isvalid(Char, 'a') == true\n+@test isvalid(Char, '\\x00') == true\n+\n+# test all edge conditions\n+@test isvalid(Char, 0) == true\n+@test isvalid(Char, 0xd7ff) == true\n+@test isvalid(Char, 0xd800) == false\n+@test isvalid(Char, 0xdfff) == false\n+@test isvalid(Char, 0xe000) == true\n+@test isvalid(Char, 0xffff) == true\n+@test isvalid(Char, 0x10000) == true\n+@test isvalid(Char, 0x10ffff) == true\n+@test isvalid(Char, 0x110000) == false\n+\n+brokenvalid = true      # Set to false if underlying validation code is fixed (# 11203)","path":"test/strings.jl","position":40,"original_position":40,"commit_id":"b67a3c61f923e48d696f0b12fb6b6d043f1d91f3","original_commit_id":"b67a3c61f923e48d696f0b12fb6b6d043f1d91f3","user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"body":"I guess this can be removed now.","created_at":"2015-05-15T15:20:50Z","updated_at":"2015-05-15T15:20:50Z","html_url":"https://github.com/JuliaLang/julia/pull/11241#discussion_r30417526","pull_request_url":"https://api.github.com/repos/JuliaLang/julia/pulls/11241","_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/30417526"},"html":{"href":"https://github.com/JuliaLang/julia/pull/11241#discussion_r30417526"},"pull_request":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/11241"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/11241","id":35192158,"html_url":"https://github.com/JuliaLang/julia/pull/11241","diff_url":"https://github.com/JuliaLang/julia/pull/11241.diff","patch_url":"https://github.com/JuliaLang/julia/pull/11241.patch","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11241","number":11241,"state":"open","locked":false,"title":"Add isvalid(Type, value) methods, to replace is_valid_*","user":{"login":"ScottPJones","id":11798751,"avatar_url":"https://avatars.githubusercontent.com/u/11798751?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottPJones","html_url":"https://github.com/ScottPJones","followers_url":"https://api.github.com/users/ScottPJones/followers","following_url":"https://api.github.com/users/ScottPJones/following{/other_user}","gists_url":"https://api.github.com/users/ScottPJones/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottPJones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottPJones/subscriptions","organizations_url":"https://api.github.com/users/ScottPJones/orgs","repos_url":"https://api.github.com/users/ScottPJones/repos","events_url":"https://api.github.com/users/ScottPJones/events{/privacy}","received_events_url":"https://api.github.com/users/ScottPJones/received_events","type":"User","site_admin":false},"body":"This adds a new generic function, intended to eventually replace the following:\r\nis_valid_ascii\r\nis_valid_utf8\r\nis_valid_utf16\r\nis_valid_utf32\r\nis_valid_char\r\nThis was suggested by @quinnj on the thread for #11140","created_at":"2015-05-12T04:20:30Z","updated_at":"2015-05-15T15:20:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5f315c264bb150ef831e3d01ed4154b97643729","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaLang/julia/pulls/11241/commits","review_comments_url":"https://api.github.com/repos/JuliaLang/julia/pulls/11241/comments","review_comment_url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11241/comments","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/b67a3c61f923e48d696f0b12fb6b6d043f1d91f3","head":{"label":"ScottPJones:spj/isvalid","ref":"spj/isvalid","sha":"b67a3c61f923e48d696f0b12fb6b6d043f1d91f3","user":{"login":"ScottPJones","id":11798751,"avatar_url":"https://avatars.githubusercontent.com/u/11798751?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottPJones","html_url":"https://github.com/ScottPJones","followers_url":"https://api.github.com/users/ScottPJones/followers","following_url":"https://api.github.com/users/ScottPJones/following{/other_user}","gists_url":"https://api.github.com/users/ScottPJones/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottPJones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottPJones/subscriptions","organizations_url":"https://api.github.com/users/ScottPJones/orgs","repos_url":"https://api.github.com/users/ScottPJones/repos","events_url":"https://api.github.com/users/ScottPJones/events{/privacy}","received_events_url":"https://api.github.com/users/ScottPJones/received_events","type":"User","site_admin":false},"repo":{"id":34334720,"name":"julia","full_name":"ScottPJones/julia","owner":{"login":"ScottPJones","id":11798751,"avatar_url":"https://avatars.githubusercontent.com/u/11798751?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottPJones","html_url":"https://github.com/ScottPJones","followers_url":"https://api.github.com/users/ScottPJones/followers","following_url":"https://api.github.com/users/ScottPJones/following{/other_user}","gists_url":"https://api.github.com/users/ScottPJones/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottPJones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottPJones/subscriptions","organizations_url":"https://api.github.com/users/ScottPJones/orgs","repos_url":"https://api.github.com/users/ScottPJones/repos","events_url":"https://api.github.com/users/ScottPJones/events{/privacy}","received_events_url":"https://api.github.com/users/ScottPJones/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ScottPJones/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":true,"url":"https://api.github.com/repos/ScottPJones/julia","forks_url":"https://api.github.com/repos/ScottPJones/julia/forks","keys_url":"https://api.github.com/repos/ScottPJones/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ScottPJones/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ScottPJones/julia/teams","hooks_url":"https://api.github.com/repos/ScottPJones/julia/hooks","issue_events_url":"https://api.github.com/repos/ScottPJones/julia/issues/events{/number}","events_url":"https://api.github.com/repos/ScottPJones/julia/events","assignees_url":"https://api.github.com/repos/ScottPJones/julia/assignees{/user}","branches_url":"https://api.github.com/repos/ScottPJones/julia/branches{/branch}","tags_url":"https://api.github.com/repos/ScottPJones/julia/tags","blobs_url":"https://api.github.com/repos/ScottPJones/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ScottPJones/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ScottPJones/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/ScottPJones/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ScottPJones/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/ScottPJones/julia/languages","stargazers_url":"https://api.github.com/repos/ScottPJones/julia/stargazers","contributors_url":"https://api.github.com/repos/ScottPJones/julia/contributors","subscribers_url":"https://api.github.com/repos/ScottPJones/julia/subscribers","subscription_url":"https://api.github.com/repos/ScottPJones/julia/subscription","commits_url":"https://api.github.com/repos/ScottPJones/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/ScottPJones/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/ScottPJones/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/ScottPJones/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/ScottPJones/julia/contents/{+path}","compare_url":"https://api.github.com/repos/ScottPJones/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ScottPJones/julia/merges","archive_url":"https://api.github.com/repos/ScottPJones/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ScottPJones/julia/downloads","issues_url":"https://api.github.com/repos/ScottPJones/julia/issues{/number}","pulls_url":"https://api.github.com/repos/ScottPJones/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/ScottPJones/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/ScottPJones/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ScottPJones/julia/labels{/name}","releases_url":"https://api.github.com/repos/ScottPJones/julia/releases{/id}","created_at":"2015-04-21T15:12:29Z","updated_at":"2015-05-08T00:23:59Z","pushed_at":"2015-05-15T14:41:56Z","git_url":"git://github.com/ScottPJones/julia.git","ssh_url":"git@github.com:ScottPJones/julia.git","clone_url":"https://github.com/ScottPJones/julia.git","svn_url":"https://github.com/ScottPJones/julia","homepage":"http://julialang.org/","size":71365,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaLang:master","ref":"master","sha":"ff35d98da7bfa85f57546e3e9654decea893ea08","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"name":"julia","full_name":"JuliaLang/julia","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","created_at":"2011-04-21T07:01:50Z","updated_at":"2015-05-15T09:22:50Z","pushed_at":"2015-05-15T15:14:28Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"http://julialang.org/","size":207267,"stargazers_count":5499,"watchers_count":5499,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1153,"mirror_url":null,"open_issues_count":1279,"forks":1153,"open_issues":1279,"watchers":5499,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/11241"},"html":{"href":"https://github.com/JuliaLang/julia/pull/11241"},"issue":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/11241"},"comments":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/11241/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/11241/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/11241/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaLang/julia/statuses/b67a3c61f923e48d696f0b12fb6b6d043f1d91f3"}}}}