Skip to content

Commit

Permalink
Update UTF16String map function
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottPJones committed Jun 25, 2015
1 parent 00f0200 commit 2ab9334
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/utf16.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ function map(fun, str::UTF16String)
end
uc = reinterpret(UInt32, c2)
if uc < 0x10000
if utf16_is_surrogate(UInt16(uc))
if is_surrogate_codeunit(UInt16(uc))
throw(UnicodeError(UTF_ERR_INVALID_CHAR, 0, uc))
end
push!(buf, UInt16(uc))
Expand Down

0 comments on commit 2ab9334

Please sign in to comment.