pair@harkness:~/dev/play(master+)$ bin/play index
/Users/pair/dev/play/lib/play/library.rb:20:in `split': invalid byte sequence in US-ASCII (ArgumentError)
from /Users/pair/dev/play/lib/play/library.rb:20:in `fs_songs'
from /Users/pair/dev/play/lib/play/library.rb:30:in `import_songs'
from bin/play:41:in `block in index_music'
from bin/play:41:in `fork'
from bin/play:41:in `index_music'
from bin/play:62:in `<main>'
I fixed it by inserting
Encoding.default_external = 'utf-8'
above line 20 of lib/play/library.rb
I'd submit a patch, but I'm not sure where that line is supposed to go.
set encoding (closes #27)
I'm going to try the magic comment on this instead; if you could, could you check it and see if that indexes fine for you?
Thanks for digging into this; I have a pretty large library but haven't run into this yet.
I've tried inserting the
# encoding: utf-8
at the top of that file to no avail. It seemed that the
force encoding (#27)
I added that explicitly.
Are you using 1.9.x? I'm catching some weird segfaults on 1.9.3 (presumably with some of the audio indexing third party gems I'm using). I think I might force 1.8.7 for now.
Revert "force encoding (#27)"
This reverts commit 333f826.
Yeah, I'm going to yank this; 1.8.7 is where play will run for now.
Hrm. Well, we're using play on ruby 1.9.2-p290, and simply adding the Encoding line works. Haven't tested 1.8.x.
The Encoding call breaks in non-1.9 environments. We can work around it, but I think the entire library needs a lot more thought for 1.9 before we move that direction. I'll punt on it until then.