char* vs char[]

Stewart Gordon smjg_1998 at yahoo.com
Wed Dec 20 12:06:31 PST 2006


novice2 wrote:
<snip>
> in non-english Windows, for my big sorrow,

The language of your version of Windows has no effect whatsoever on what 
follows.

> imho, you need use
> std.windows.charset.toMBSz() to pass char[] from D to C function,
> and
> std.windows.charset.fromMBSz() to pass char[] from C function to D,

Not quite.  C functions can, as they please, work in any character 
encoding or not care at all about encoding.

But if you're interfacing the OS, as is the case here, then you will 
need to make sure the data you're transmitting is in the right encoding.

> in general case in _every char* in every call_ :(
> how i bored with utf8 while program small windows console utilitis :
> (
<snip>

Check out smjg.libs.util.console in my utility library:

http://pr.stewartsplace.org.uk/d/sutil/

Stewart.


More information about the Digitalmars-d-learn mailing list