|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
converting short to unicode without System.Text.UnicodeEncodinghi, how can i convert type Short to Unicode strings? the
System.Text.UnicodeEncoding cant convert it if the length is too shrot....so i need to do this manually. how can i do this -- -iwdu15 Aren't strings in dotnet in unicode by default?
Thus: Dim s as short = 5 Dim u as string = CType(s, integer).ToString() Or am I completely missing the point here? iwdu15 wrote:
> hi, how can i convert type Short to Unicode strings? the What do you mean? Values of type Short are numbers - do you just want> System.Text.UnicodeEncoding cant convert it if the length is too shrot....so > i need to do this manually. how can i do this their decimal representations? All .NET Strings are Unicode, so you just need to say Dim myShort As Short = 5 Dim myString As String = myShort.ToString Encodings are for translating between bytes and characters. -- Larry Lard Replies to group please When starting a new topic, please mention which version of VB/C# you are using "iwdu15" <jmmgoalsteratyahoodotcom> schrieb: I am not sure what you want to archieve, but maybe 'ChrW(x)' is what you are > hi, how can i convert type Short to Unicode strings? looking for. Note that Microsoft unfortunately uses the term Unicode instead of UTF-16. Strings are stored as UTF-16 in .NET. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> thanks, what im trying to o is read in header information from WMA and MP3
files. i did some reading on it and the websites i went to said that the .NET functions for to Unicode characters needed a length of atleast 256 bytes.... -- -iwdu15 256 bytes per unicode character? Wow, I don't think there are that many
alphabets in the Universe. Is that statement even correct if you had of said 256 bits ? Thats 32 bytes I think. Thats, what, a double? I'm just confusing myself. iwdu15 wrote: Show quoteHide quote > thanks, what im trying to o is read in header information from WMA and MP3 > files. i did some reading on it and the websites i went to said that the .NET > functions for to Unicode characters needed a length of atleast 256 bytes.... > -- > -iwdu15 "Steven Nagy" <learndot***@hotmail.com> schrieb: In UTF-32 each character is encoded using 32 bits (4 bytes). UTF-16 uses 16 > 256 bytes per unicode character? Wow, I don't think there are that many > alphabets in the Universe. > > Is that statement even correct if you had of said 256 bits ? Thats 32 > bytes I think. Thats, what, a double? bits per character and 32 bits (surrogate pairs) for some Chinese characters. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Reading one record from an Access DB
dataser design considerations ?Delegates and Interaces - similarities/differences? Mdi Form Validating VB.NET ComboBox _SelectedIndexChanged checking MP3 license Treeview problem ComboBox in DataGrid How to find files in a directory How to compare two identical tables in VB.NET + MS Access |
|||||||||||||||||||||||