Re: parsing Nero .nri file -- possible character set issues (perl newbie)

From: Jim Gibson (jgibson_at_mail.arc.nasa.gov)
Date: 01/14/04


Date: Wed, 14 Jan 2004 10:15:27 -0800

In article <4af35cf2.0401140907.7846f55a@posting.google.com>,
<mpepple@hotmail.com> wrote:

> Simon Taylor <simon@unisolve.com.au> wrote in message
> news:<bu27iu$4he$1@otis.netspace.net.au>...
> > Hello Matt,
> >

[response from Simon Taylor snipped]

>
> Simon-
>
> Thanks for the response. I tried pasting a portion of the nri file
> into this window but it doesn't seem to like that. the whole file is
> here: http://mattpepple.com/nero/cg36.zip (6k).

Your file is binary, not text. Therefore you might have better results
reading the file using the sysread function, not using <INFILE> type
reads, which assume lines separated by newline characters.

I use the od unix utility to inspect binary files. Here is the first
part of the result from "od -c cg36.nri":

0000000 016 N e r o I S O 0 . 0 2 . 0 3 001
0000020 \0 \0 \0 001 \0 \0 \0 \0 \0 022 N E R O _ _
0000040 _ B U R N I N G _ R O M \0 \0 \0 304
0000060 203 247 = 304 203 247 = 377 377 377 377 377 377 377 377 \0
0000100 \0 \0 \0 304 203 247 = 001 \0 \0 \0 \0 \0 \0 \0 001
0000120 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 004
0000140 M P 3 6 004 M P 3 6 020 \0 \0 \0 \0 \0 \0
0000160 \0 \0 \0 \0 \0 001 220 a * e 224 q 302 001 202
0000200 250 n 230 q 302 001 220 a * e 224 q 302 001 \0 \0
0000220 @ \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 002 \0 \0
0000240 \0 C : 202 \0 \0 \0 001 004 \0 \0 \0 m i r c
0000260 202 \0 \0 \0 001 \b \0 \0 \0 d o w n l o a
0000300 d 202 \0 \0 \0 001 004 \0 \0 \0 b u r n 202 \0
0000320 \0 \0 \0 202 \0 \0 0 B a b y f a c e
0000340 - T e n d e r L o v e r -
0000360 0 1 - I t ' s N o C r
0000400 i m e . m p 3 \0 \0 \0 \b m X \0 004
0000420 \0 \0 \0 \0 300 \0 247 C 304 p 302 001 300 s 277 C
0000440 304 p 302 001 p 021 n 256 225 q 302 001 \0 \0 \0 020
0000460 002 _ _ _ 1 V C D 1 006 \0 001 \0 \0 \0 004
0000500 \0 \0 \0 \0 \0 E D J O 003 \0 001 \0 \0 \0 001
0000520 \0 002 D O S _ 016 \0 001 \0 \0 \0 \f \0 B A
0000540 B Y F A ~ 1 . M P 3 F S I Z \n \0

You might be able to pick out the pattern of file names within this
file. Hopefully, they are organized into fixed-length records of some
type. Then, you can read each record with sysread and extract the file
names with the unpack function. For example, the file name "Babyface -
Tender Lover - 01 - It's No Crime.mp3 " starts at position 0327
(decimal 215) in the file.

[sample program snipped]

Good luck.

>
> matt



Relevant Pages

  • Matt Hardy Responds To Eric Bischoff
    ... The following is a blog written by Matt Hardy in response to Eric ... than previous generations of wrestlers makes me sick. ... sacrificed to keep the business up and running so I could work in it ...
    (rec.sport.pro-wrestling)
  • Re: Israels self-fulfilling prophecy
    ... Matt is in this thread (and in his response to your post)? ... about your interlocutor's ideology and/or motivation in the discussion. ... This leads you to misinterpret what the other person says, ... Matt seems to be in that same mode now. ...
    (talk.origins)
  • Re: car radio/cd in bathroom 12 volt supply
    ... That way I won't waste my time constructing a response. ... You know Matt, I hate to say it, but you're starting to make me realize ... you're acting like a real jerk. ... Nyah nyah nah-nyah-nyah. ...
    (rec.audio.car)
  • RE: /dev/random on Linux
    ... I did not get any answer from Matt and was sure that it was of no interest. ... Zvi did contact Matt Mackall, the current /dev/random maintainer, ... So he's demanding that one person spend time responding to his ... received no response. ...
    (Linux-Kernel)