Am 17.06.2011 15:21, schrieb Kagamin: > Daniel Gibson Wrote: > >> char* to!c_str(string s) (or immutable(char)* or something) >> i.e. the related toImpl looks like >> char* toImpl(c_str, string)(string s) >> => 3 types! (char*, c_str, string) > > btw, if we're talking about C api, the return type must not be char*, because > c string character encoding is not utf-8, but char* implies utf-8.
Of course we're talking about C api, that's the whole point of toStringz What about C functions that *do* deal with UTF8? And C functions that don't care about encoding? I don't think you usually use different types used in C for ASCII, 8bit encodings and UTF8..
