How to fix wrong deprecation message - dmd-2.075.1
Daniel Kozak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Aug 15 22:25:57 PDT 2017
You should open an issue on https://issues.dlang.org/
until it is fixed you can use lazy variation byChar, byWchar or byUTF:
void main()
{
import std.utf : byWchar;
import std.array : array;
wstring s = byWchar("abc").array;
}
On Wed, Aug 16, 2017 at 7:09 AM, apz28 via Digitalmars-d-learn <
digitalmars-d-learn at puremagic.com> wrote:
> void main()
> {
> import std.utf : toUTF16; // Same problem with toUTF8
>
> wstring s = toUTF16!string("abc");
> }
>
> Compilation output:
> /d500/f513.d(3): Deprecation: function std.utf.toUTF16 is deprecated - To
> be removed November 2017. Please use std.utf.encode instead.
> /d500/f513.d(3): Deprecation: function std.utf.toUTF16 is deprecated - To
> be removed November 2017. Please use std.utf.encode instead.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20170816/460142ae/attachment.html>
More information about the Digitalmars-d-learn
mailing list