Integrated Application Platform › Forums › General › Wcstombs – String Conversion › Reply To: Wcstombs – String Conversion
June 2, 2015 at 2:19 pm
#1187
Keymaster
I’m not sure why Wcstombs() is causing problems (I got an access violation when I tried your example). I assume it’s because the input is “bad”.
Your example is backwards – Suneido uses 8 bit character strings, so “Test” is (more or less) UTF-8 (= multi byte string = mbs).
s = “Test”.Mbstowcs()
=> “T\x00e\x00s\x00t\x00\x00\x00”
s.Wcstombs()
=> “Test”