diff --git a/base/c.jl b/base/c.jl index a26f41856dc8f..b54101773468f 100644 --- a/base/c.jl +++ b/base/c.jl @@ -270,6 +270,21 @@ reasonably represented in the target encoding; it always succeeds for conversions between UTF-XX encodings, even for invalid Unicode data. Only conversion to/from UTF-8 is currently supported. + +# Examples +```jldoctest +julia> str = "αβγ" +"αβγ" + +julia> transcode(UInt16, str) +3-element Vector{UInt16}: + 0x03b1 + 0x03b2 + 0x03b3 + +julia> transcode(String, transcode(UInt16, str)) +"αβγ" +``` """ function transcode end