I've managed to achieve something like this as folows:
let's day I've got a byte-array with values: {200, 201, 202}, in chars: È,
É, Ê. If you try to convert it straightaway to a Unicode string it fails.
This is because Unicode uses 2 bytes for 1 character. So for each character
I've inserted a seccond byte with the value 0. You can easily achieve this
in a For...Next loop.
So now I've got a byte() with values: {200, 0, 201, 0, 202, 0}. If you
insert this array into the function:
System.Text.UnicodeEncoding.Unicode.GetString() it results in the correct
string.
HTH,
Friso Wiskerke
"GM" <in*****@invalid.com> wrote in message
news:Ov**************@TK2MSFTNGP11.phx.gbl...
----
I loose my special characters.
I've tried other encodings like
system.text.encoding.unicode.getstring(bytes), but this doesn't work.
good: Louie düvaliéè
bad: Louie dvali,S
The client is a c++ program, the server is vb.net