F
Franky
I have a Command Prompt window open and select all the characters and copy
them to the clipboard.
I then read them from the clipboard
str = CType(DataO.GetData(DataFormats.OemText, False), String)
and try to convert them to unicode
Dim InEncoding As Encoding = Encoding.GetEncoding(437)
Dim OutEncoding As Encoding = Encoding.Unicode
Dim StrAsBytes As Byte() = InEncoding.GetBytes(str)
Dim OutEncodingBytes As Byte() = Encoding.Convert(InEncoding, OutEncoding,
StrAsBytes)
Dim OutEncodingChars As Char() = OutEncoding.GetChars(OutEncodingBytes)
textbox1.text= = New String(OutEncodingChars)
But they do not display correctly.
Can you see what is wrong?
them to the clipboard.
I then read them from the clipboard
str = CType(DataO.GetData(DataFormats.OemText, False), String)
and try to convert them to unicode
Dim InEncoding As Encoding = Encoding.GetEncoding(437)
Dim OutEncoding As Encoding = Encoding.Unicode
Dim StrAsBytes As Byte() = InEncoding.GetBytes(str)
Dim OutEncodingBytes As Byte() = Encoding.Convert(InEncoding, OutEncoding,
StrAsBytes)
Dim OutEncodingChars As Char() = OutEncoding.GetChars(OutEncodingBytes)
textbox1.text= = New String(OutEncodingChars)
But they do not display correctly.
Can you see what is wrong?