Open mkitti opened 2 years ago
See the transcode
function. For example transcode(UInt16, x)
for UTF-16 or transcode(UInt32, x)
for UTF-32.
My current thought is to add a type parameter. The default type will be UInt8
. Unlike in PythonCall.jl, The parameter order will be StaticString{N,T}
, the same order as NTuple{N,T}
. We would then try to follow the legacy strings pattern, but mostly just provide facilities for storing the type and using transcode
to conver between the types.
Currently StaticStrings.jl supports UTF-8 only.
We could support UTF-16 or UTF-132 as in https://github.com/JuliaStrings/LegacyStrings.jl