forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request JuliaLang#12360 from ScottPJones/spj/cesu8fix
Fix a bug handling CESU-8 strings in convert(UTF8String, Vector{UInt8}
- Loading branch information
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# This file is a part of Julia. License is MIT: http://julialang.org/license | ||
|
||
include("unicode/checkstring.jl") | ||
include("unicode/utf8.jl") | ||
include("unicode/utf16.jl") | ||
include("unicode/utf32.jl") | ||
include("unicode/utf8proc.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is a part of Julia. License is MIT: http://julialang.org/license | ||
|
||
## Test for CESU-8 sequences | ||
|
||
let ch = 0x10000 | ||
for hichar = 0xd800:0xdbff | ||
for lochar = 0xdc00:0xdfff | ||
@test convert(UTF8String, utf8(Char[hichar, lochar]).data) == string(Char(ch)) | ||
ch += 1 | ||
end | ||
end | ||
end |