Hi all,
When using the GetString method to decode bytes into a string, I am having an issue where the string is incomplete. The decode works fine and the return string can be used as a value into a textbox or messagebox, but not for reference to a file path or anything of that nature. I am reading the tags from MP3's and want to create a directory for each artist. I can get the artist name, but if I try to refer to the value to create the directory, it is incomplete. example;
If the artist is The Beatles the string returned is literally "The Beatles not "The Beatles". It is missing the end quotation marks. I can place the value into a textbox, but can not create a directory from the value.
returns an illegal characters in path error.
What is my malfunction?
When using the GetString method to decode bytes into a string, I am having an issue where the string is incomplete. The decode works fine and the return string can be used as a value into a textbox or messagebox, but not for reference to a file path or anything of that nature. I am reading the tags from MP3's and want to create a directory for each artist. I can get the artist name, but if I try to refer to the value to create the directory, it is incomplete. example;
Code:
Private b_Artist(30) As Byte
dim MP3File = New System.IO.FileStream(p_FilePath, IO.FileMode.Open, FileAccess.Read)
MP3File.Read(b_Artist, 0, b_Artist.Length - 1)
dim s_Artist AS String = Encoding.Default.GetString(b_Artist, 0, b_Artist.Length - 1)
Code:
IO.File.CreateDirectory("C:\" & s_Artist)
What is my malfunction?