where is the memory corruption?
Patrick Schluter
Patrick.Schluter at bbox.fr
Thu Dec 10 08:14:44 UTC 2020
On Wednesday, 9 December 2020 at 21:28:04 UTC, Paul Backus wrote:
> On Wednesday, 9 December 2020 at 21:21:58 UTC, ag0aep6g wrote:
>>
>> D's wchar is not C's wchar_t. D's wchar is 16 bits wide. The
>> width of C's wchar_t is implementation-defined. In your case
>> it's probably 32 bits.
>
> In D, C's wchar_t is available as `core.stdc.stddef.wchar_t`.
>
> http://dpldocs.info/experimental-docs/core.stdc.stddef.wchar_t.1.html
Don't use wchar_t in C. It has variable size depending of
implementation. On Posix machines (Linux, BSD etc.) it's 32 bit
wide UTF-32, on Windows it 16 bit UTF-16.
More information about the Digitalmars-d-learn
mailing list