dhowden / tag

ID3, MP4 and OGG/FLAC metadata parsing in Go
BSD 2-Clause "Simplified" License
558 stars 73 forks source link

Encoding error reading file #35

Closed blimmo closed 6 years ago

blimmo commented 6 years ago

Running this code:

package main

import (
    "log"
    "os"

    "github.com/dhowden/tag"
)

func main() {
    f, err := os.Open("test.mp3")
    if err != nil {
        log.Fatal(err)
    }
    m, err := tag.ReadFrom(f)
    if err != nil {
        log.Fatal(err)
    }
    log.Println(m.Format())
}

On the attached file (in a zip to get github to accept it) test.zip

Gives this error:

error decoding tag description text: invalid encoding: expected even number of bytes for UTF-16 encoded text

The file has non-ASCII characters in the metadata. I thought it might be a bad file but windows, foobar, etc. are fine with it and displaying its metadata.

blimmo commented 6 years ago

Fixed by #36

lazaroofarrill commented 3 years ago

I'm still getting this error with some of my files

wader commented 3 years ago

Could you attach an example file?

lazaroofarrill commented 3 years ago

Sorry for taking so long. 2CELLOS - Despacito.mp3.zip