Let's schedule WinAPI ASCII functions for deprecation!
Stewart Gordon
smjg_1998 at yahoo.com
Wed May 23 11:34:19 PDT 2012
On 23/05/2012 15:16, Kagamin wrote:
<snip>
> Well, you can't fix C because C explicitly ignores string encoding and thoughtlessly
> passes strings around without any transcoding. Though, D bindings suggest that C functions
> accept utf-8 strings
A lot of C functions do. Indeed, this is one of the considerations made in the design of
UTF-8.
> which leads to assumption that those functions will act properly on
> utf-8 strings. I'd say that's a bug in bindings: C strings are specified to be in C
> encoding,
What is "C encoding"?
> not utf-8 encoding. I think, conversion from D string to C string should require
> at least a cast.
Several people have dealt with this by using byte or ubyte as D's equivalent of the C char
type.
Stewart.
More information about the Digitalmars-d
mailing list