google didnt help me such as i wanted so im writing post here. i have Unicode string in C# and C function (in dll) which want the char(ANSI)*. i try to do
string tmp = "ala ma kota"; unsafe { fixed (byte* data = &tmp.ToCharArray()[0]) { some_function(data); } } but i cannot convert directly without encoding. I try to use Encode class but without any effects. I know that, the some_function needs to be called with char pointer. Where it points to array of byte.