You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is a single convert method that allows conversion to UTF8String with a argument for a replacement string, but that is only defined for an input of Vector{UInt8}, and not from the very many different possible arguments to convert(UTF8String, data).
There are other places in the code where a fixed replacement, 0xfffd, is hard-coded.
There needs to be consistent handling for converting strings from vectors of code units (UInt8, UInt16, and UInt32) to the (current) 4 types of strings ASCIIString,UTF8String,UTF16String,UTF32String, that allows specifying the handling of Modified UTF-8, CESU-8, overly long encodings, and also whether invalid sequences should cause an exception, be replaced by a default replacement character (0xfffd for Unicode, 0x1a [SUB] for ASCII), or replaced by a user supplied string.
Currently, there is a single
convert
method that allows conversion toUTF8String
with a argument for a replacement string, but that is only defined for an input ofVector{UInt8}
, and not from the very many different possible arguments toconvert(UTF8String, data)
.There are other places in the code where a fixed replacement,
0xfffd
, is hard-coded.UInt8
,UInt16
, andUInt32
) to the (current) 4 types of stringsASCIIString
,UTF8String
,UTF16String
,UTF32String
, that allows specifying the handling ofModified UTF-8
,CESU-8
, overly long encodings, and also whether invalid sequences should cause an exception, be replaced by a default replacement character (0xfffd
for Unicode,0x1a
[SUB] for ASCII), or replaced by a user supplied string.The text was updated successfully, but these errors were encountered: