Is autodecoding being phased out?

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 21 09:34:33 PST 2017


On Tue, Feb 21, 2017 at 02:46:10PM +0000, Dukc via Digitalmars-d-learn wrote:
> I (finally) managed to build the development build of dmd, with
> libraries.  When testing if it compiles a Hello World program (it
> does, no problem) I got these messages:
> 
> C:\D\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(2716,24): Deprecation:
> function std.utf.toUTF8 is deprecated - To be removed November 2017. Please
> use std.utf.encode instead.
> C:\D\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(2716,24): Deprecation:
> function std.utf.toUTF8 is deprecated - To be removed November 2017. Please
> use std.utf.encode instead.
> C:\D\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(2727,40): Deprecation:
> function std.utf.toUTF8 is deprecated - To be removed November 2017. Please
> use std.utf.encode instead.
> 
> If I output a dstring instead, those messages vanish. Does that mean
> we're getting rid of autodecoding?
> 
> If that's the case, have nothing against that. In fact it is nice to
> have that deprecation to catch bugs. I just thought, due to an earlier
> forum discussion, that it's not going to happen because it could break
> too much code. That's why I'm asking...

Do another git update.  This is a transitory issue where std.stdio got a
bit out-of-sync with std.utf, but this deprecation message should no
longer appear in the latest git HEAD.  (I also saw the same messages and
was about to submit a PR, but after updating my git repos they went
away.)


T

-- 
Unix was not designed to stop people from doing stupid things, because that would also stop them from doing clever things. -- Doug Gwyn


More information about the Digitalmars-d-learn mailing list