OK, I changed it to:
sUTF8=System.Text.Encoding
(because "UTF16" is not a valid encoding name)
or indeed :
sUTF8=System.Text.Encoding
but it doesn't work, try it, if you set sUTF16 = "ë" then the return sUTF8 is empty.
I come from the world of Delphi, where this is done simply:
sUTF8 := UTF8Encode(sUTF16);
I'm finding it particularly frustrating that such a simple transform is proving so elusive in C#, have I completely missed the point somewhere along the way?
Main Topics
Browse All Topics





by: SnowFlakePosted on 2006-01-20 at 06:23:52ID: 15748900
you can use
.UTF8.GetS tring(Syst em.Text.En coding.Get Encoding(" UTF16").Ge tBytes(sUT F16))
sUTF8=System.Text.Encoding
SnowFlake