https://issues.dlang.org/show_bug.cgi?id=14519

Martin Nowak <c...@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |c...@dawg.eu

--- Comment #23 from Martin Nowak <c...@dawg.eu> ---
(In reply to Vladimir Panteleev from comment #20)
> (In reply to Marc Schütz from comment #18)
> > Data with other (or unknown) encodings needs to be stored in `ubyte[]`.
> 
> Have you tried using ubyte[] to process ASCII text? It's horrible, you have
> to cast at every step, and nothing in std.string works even when it should.

No one is suggesting you operate on ubyte[] as string.
What people are is saying is you should validate a ubyte[] array before
converting it to a string. This is by the way how readText works. You'll have
to cast raw data to string to get strings with invalid UTF.

--

Reply via email to