Computer Science Canada Reading illegal characters |
Author: | neufelni [ Sat Jun 09, 2007 9:32 pm ] |
Post subject: | Reading illegal characters |
For my final project for compsci class, I am trying to make a media player. I am currently trying to get the track information from the mp3 files id3 tags, but when I read in a line of the file, Turing tells me there is an illegal character in the string. Is there anyway I can get Turing to ignore these characters, or deal with this problem in any way? As far as I know, Turing doesn't have any support for Exceptions/Error Handling. |
Author: | DIIST [ Sat Jun 09, 2007 10:34 pm ] |
Post subject: | Re: Reading illegal characters |
Use "read" command, and read a sequence of bytes as opposed to "getting" the whole line from the file. Reason is some characters are used to represent the uninitialized state of a variable. Displaying these characters will cause an error. ![]() Its interesting that you are trying to read a mp3 file. How are you going about decompressing it. If i remember right, you need to know Huff encoding which involves creating a balanced structured tree, not something learn in your average high school class ![]() Seems to be a tight project good luck. ![]() |