in reply to Re^3: ID3 tag version 2.4.0 Pack and Unpack (text encoding byte)
in thread ID3 tag version 2.4.0 Pack and Unpack

Hello again tye,

I understand what you mean by the null terminating character on the strings. But on the flag how can I remove it? I assume you mean the part that I apply if ($flags == 0). I assume, I tried to apply chop right after the part ( $flags ) = unpack ( "h" , $lines ); I apply chop($flags);. On the writing part I still have the problem. Unless if I miss understood.

I know that I am missing somewhere one byte and I can not understand what is my error.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^5: ID3 tag version 2.4.0 Pack and Unpack (not terminating)
by tye (Sage) on Sep 05, 2014 at 00:16 UTC
    I understand what you mean by the null terminating character on the strings.

    That is unfortunate as I have not been saying anything about null terminating characters. I have been talking about a single byte that is not part of the strings and is not terminating but goes right before each string. And it doesn't have to be a "null". It can be "\0", "\01", "\02", or "\03".

    Please go re-read my first post once you have thoroughly dismissed from your mind the idea that I'm talking about the "\0" bytes that terminate string values. Pay special attention to the part where I quote part of the spec you linked to. Then go find that part of the spec and read more there.

    - tye        

      Hello tye,

      Ok I think I finally understood what you mean. In this case what else can I do, since I applied poch($flags) right after the ( $flags ) = unpack ( "h" , $lines );.

      Unfortunately there was no change on my problem. I an still getting one less character at the beginning of the string.

      Seeking for Perl wisdom...on the process of learning...not there...yet!