What's the problem if add toMBSz to tango.sys.win32 ?

yidabu yidabu.spam at gmail.com
Thu Apr 24 08:07:57 PDT 2008


Tango and almost all Tango based libs and tools have same issue:
use tango.stdc.stringz.toStringz(name) or name ~ '\0' instead of toMBSz(name) for calling A version Windows API, that's wrong!
program may crashed if multi byte name.

you might say, why not just create a ticket for Tango, right, I created it long time ago, but Kris seems not a MS fans :)
http://www.dsource.org/projects/tango/ticket/653

you might say, how about the tango.sys.win32.CodePage module?

but:
1 the name, "toMBSz" is better than "CodePage" in this case
2 the implementation, toMBSz is better in this case
2 Tango itself not use CodePage module in this case

It is too tedious to create bug tickets for every tango based libs, tools(if have this issue)!

I can't understand what's the problem if add toMBSz to tango.sys.win32, if problem, why Phobos have not this problem?



-- 
yidabu <yidabu.spam at gmail.com>
http://www.dsource.org/projects/dwin

D 语言-中文(D Chinese):
http://www.d-programming-language-china.org/
http://bbs.d-programming-language-china.org/
http://dwin.d-programming-language-china.org/
http://scite4d.d-programming-language-china.org/





More information about the Digitalmars-d mailing list