A
almurph
Hi,
Hope that you can help me here. I'm trying to write a little windows
appliction that takes essentially calculates and displays the VB.NET
"ChrW()" code for an exotic character (mainly east European languages
like the cadilla, ogonek etc, not Chinese or anything like that).
For example, say I cut an paste the exotic character: latin capital U
with Diaeresis into a field. Is it possible to write code to get the
little-endian uncode encosing for this
Latin Capital Letter U with Diaeresis (U+00DC) ---> &H00DC
So if I then do:
ChrW(&H00DC) ----> I get : Latin Capital Letter U with Diaeresis
In other words, I'm looking for nice way to generate the unicode of a
character that I cut and paste into a textbox.
I know how to convert a string into a byte array (that's easy - code
below) but after that I start to get stuck. Can you help me please?
Any comments/suggestions/comments/code-samples much appreciated...
Cheers,
Al.
***** BEGIN CODE SAMPLE *****
Public Shared Function StrToByteArray(ByVal str As String) As Byte()
Dim encoding As New System.Text.UnicodeEncoding 'UTF-16
Return encoding.GetBytes(str)
End Function
**** END *****
Hope that you can help me here. I'm trying to write a little windows
appliction that takes essentially calculates and displays the VB.NET
"ChrW()" code for an exotic character (mainly east European languages
like the cadilla, ogonek etc, not Chinese or anything like that).
For example, say I cut an paste the exotic character: latin capital U
with Diaeresis into a field. Is it possible to write code to get the
little-endian uncode encosing for this
Latin Capital Letter U with Diaeresis (U+00DC) ---> &H00DC
So if I then do:
ChrW(&H00DC) ----> I get : Latin Capital Letter U with Diaeresis
In other words, I'm looking for nice way to generate the unicode of a
character that I cut and paste into a textbox.
I know how to convert a string into a byte array (that's easy - code
below) but after that I start to get stuck. Can you help me please?
Any comments/suggestions/comments/code-samples much appreciated...
Cheers,
Al.
***** BEGIN CODE SAMPLE *****
Public Shared Function StrToByteArray(ByVal str As String) As Byte()
Dim encoding As New System.Text.UnicodeEncoding 'UTF-16
Return encoding.GetBytes(str)
End Function
**** END *****