New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index fails when non-US-ASCII filename encountered #27

Closed
listrophy opened this Issue Nov 11, 2011 · 8 comments

Comments

Projects
None yet
2 participants
@listrophy

listrophy commented Nov 11, 2011

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>'
@listrophy

This comment has been minimized.

Show comment
Hide comment
@listrophy

listrophy Nov 11, 2011

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.

listrophy commented Nov 11, 2011

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.

@holman holman closed this in 5e8a63c Nov 11, 2011

@holman

This comment has been minimized.

Show comment
Hide comment
@holman

holman Nov 11, 2011

Member

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.

Member

holman commented Nov 11, 2011

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.

@listrophy

This comment has been minimized.

Show comment
Hide comment
@listrophy

listrophy Nov 11, 2011

I've tried inserting the

# encoding: utf-8

at the top of that file to no avail. It seemed that the

Encoding.default_external = 'utf-8'

was required.

listrophy commented Nov 11, 2011

I've tried inserting the

# encoding: utf-8

at the top of that file to no avail. It seemed that the

Encoding.default_external = 'utf-8'

was required.

holman added a commit that referenced this issue Nov 11, 2011

@holman

This comment has been minimized.

Show comment
Hide comment
@holman

holman Nov 11, 2011

Member

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.

Member

holman commented Nov 11, 2011

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.

holman added a commit that referenced this issue Nov 11, 2011

@holman

This comment has been minimized.

Show comment
Hide comment
@holman

holman Nov 11, 2011

Member

Yeah, I'm going to yank this; 1.8.7 is where play will run for now.

Member

holman commented Nov 11, 2011

Yeah, I'm going to yank this; 1.8.7 is where play will run for now.

@listrophy

This comment has been minimized.

Show comment
Hide comment
@listrophy

listrophy Nov 11, 2011

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.

listrophy commented Nov 11, 2011

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.

@holman

This comment has been minimized.

Show comment
Hide comment
@holman

holman Nov 11, 2011

Member

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.

Member

holman commented Nov 11, 2011

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.

@listrophy

This comment has been minimized.

Show comment
Hide comment
@listrophy

listrophy Nov 11, 2011

roger dodger

listrophy commented Nov 11, 2011

roger dodger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment