Thread overview
[Issue 19151] std.utf.toUTF16z() can not be used for LPWSTR
Jan 21, 2019
Bastiaan Veelo
Jan 21, 2019
Bastiaan Veelo
Jan 21, 2019
Bastiaan Veelo
Feb 22, 2019
Dlang Bot
Feb 22, 2019
Dlang Bot
January 21, 2019
https://issues.dlang.org/show_bug.cgi?id=19151

Bastiaan Veelo <Bastiaan@Veelo.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Bastiaan@Veelo.net

--
January 21, 2019
https://issues.dlang.org/show_bug.cgi?id=19151

--- Comment #1 from Bastiaan Veelo <Bastiaan@Veelo.net> ---
I can confirm this.

Not sure whether this workaround is right, but it works:

commandLine.toUTFz!(wchar*)

--
January 21, 2019
https://issues.dlang.org/show_bug.cgi?id=19151

--- Comment #2 from Bastiaan Veelo <Bastiaan@Veelo.net> ---
The return type changed from wchar* to const(wchar*) ages ago, in a commit
called "phobos-2.000". Git reports 10/09/2007, which seems to be the date of
the migration from another RCS.
https://github.com/dlang/phobos/commit/de971890b0c0780942857b92ec11168d827ef715#diff-27410a0be96392a06647e61c73131b64L797

Anyway, this is when toUTF16z stopped working for LPWSTR. Can toUTF16z be changed to use inout, maybe?

Bastiaan.

--
February 22, 2019
https://issues.dlang.org/show_bug.cgi?id=19151

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@veelo created dlang/phobos pull request #6875 "toUTF16z cannot be used for LPWSTR." fixing this issue:

- toUTF16z cannot be used for LPWSTR.

  Remove false statement from the documentation. Fixes issue 19151.

https://github.com/dlang/phobos/pull/6875

--
February 22, 2019
https://issues.dlang.org/show_bug.cgi?id=19151

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/phobos pull request #6875 "toUTF16z cannot be used for LPWSTR." was merged into master:

- 9e5752313498999fa97a97d7d3d6adc8b7f74b33 by Bastiaan Veelo:
  toUTF16z cannot be used for LPWSTR.

  Remove false statement from the documentation. Fixes issue 19151.

https://github.com/dlang/phobos/pull/6875

--