--- Comment #7 from Jonathan M Davis <> 2012-09-11 15:13:21 
PDT ---
> `char` is UTF-8 codepoint in D. It is specified and there is no choice. And 
> you know it. So I don't understand your comment.

Yes. But it's expected to use char when dealing with C's char. Any necessary
conversion should be done at the call site. At most what you'd do is make C
signature's take ubyte instead of char, which would cause all kinds of

Yes. You need to be careful when passing strings to C functions which take
char, because Microsoft was stupid, and ideally you'd use the w* functions on
Windows precisely because of this nonsense, but that's something that the
programmer needs to know and handle appropriately. The function signature
itself is fine. Making it ubyte wouldn't solve anything, and you'd basically be
arguing that ubyte should always be used instead of char in C bindings, and I
don't think that you're going to find much traction on that.

Another thing to remember is that we currently use digitalmars' C runtime, so
stuff like fopen is provided by _it_ and not Microsoft, which could introduce
its own set of quirks (and also means that the w* functions aren't even
available for anything in the C runtime). And that situation is about to become
that much more complicated when we start supporting Microsoft's runtime for

If there's a bug, it's in the usage of fopen and friends, not in fopen itself
(unless you count Microsoft's choice of CP_ACP as a bug, but that's not in our
control in either case).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to