Skip to content

Commit c447da5

Browse files
committed
Add note in docs about Windows implementation not checking validity
1 parent eebb165 commit c447da5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/iconv.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ end
188188
189189
Returns a new read-only I/O stream, which converts text in the encoding `from`
190190
read from `istream` into text in the encoding `to`.
191+
192+
Note that some implementations (notably the Windows one) may accept invalid sequences
193+
in the input data without raising an error.
191194
"""
192195
function StringDecoder(istream::IO, from::ASCIIString, to::ASCIIString="UTF-8")
193196
cd = iconv_open(to, from)
@@ -256,6 +259,9 @@ encoding_string(::Type{UTF32String}) = (ENDIAN_BOM == 0x04030201) ? "UTF-32LE" :
256259
decode(a::Vector{UInt8}, enc::ASCIIString)
257260
258261
Convert an array of bytes `a` representing text in encoding `enc` to a string.
262+
263+
Note that some implementations (notably the Windows one) may accept invalid sequences
264+
in the input data without raising an error.
259265
"""
260266
function decode(a::Vector{UInt8}, enc::ASCIIString)
261267
b = IOBuffer(a)

0 commit comments

Comments
 (0)