core.exception.UnicodeException at src\rt\util\utf.d(400): illegal UTF-16 value
via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Sep 17 00:49:11 PDT 2014
On Tuesday, 16 September 2014 at 20:19:24 UTC, notna wrote:
> Thanks AsmMan,
>
> Found
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms724432%28v=vs.85%29.aspx
> and with your help, now understand :)
>
> The syntax below prints a blank after my username, so the slice
> seems a bit too long :O So my "final solution" looks like:
Most likely because the length returned by `GetUserNameW()`
includes the trailing zero byte.
More information about the Digitalmars-d-learn
mailing list