Thread overview
[Issue 14370] std.utf.toUTF8 has an incorrect contract
[Issue 14370] writeln() crashes on invalid dchar
Sep 14, 2017
b2.temp@gmx.com
Mar 21, 2020
Basile-z
March 29, 2015
https://issues.dlang.org/show_bug.cgi?id=14370

briancschott@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |briancschott@gmail.com

--- Comment #1 from briancschott@gmail.com ---
There is a contract in toUTF8 that checks the return value of isValidDchar, but isValidDchar will return true for some code points that toUTF8 does not handle.

--
March 29, 2015
https://issues.dlang.org/show_bug.cgi?id=14370

briancschott@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
            Summary|writeln() crashes on        |std.utf.toUTF8 has an
                   |invalid dchar               |incorrect contract
                 OS|Windows                     |All

--
September 14, 2017
https://issues.dlang.org/show_bug.cgi?id=14370

b2.temp@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |b2.temp@gmx.com
         Resolution|---                         |WORKSFORME

--- Comment #2 from b2.temp@gmx.com ---
It throws an UTF exception nowadays and BTW toUTF8 is not used anymore since it's deprecated in favor of encode().

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=14370

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--