jmdavis/phobos — comment on commit 2d340a9ea3d8e738693f81c688f25440a49ff107
File: std/utf.d line 1207
By andralex:

This allocates result with as many encoding units as the source. Couldn't this mess up UTF16 to UTF8 conversion? I presume a good amount of characters are 1-unit in UTF16 and 2 or more units in UTF8. That means you'll overrun your memory budget.