RBX 1.9 Confused by UTF-8 Byte-Order-Marks in File.read #1859

Closed
mysteriouspants opened this Issue Aug 13, 2012 · 4 comments

Projects

None yet

2 participants

@mysteriouspants

While trying to isolate another unrelated bug, I found an encoding bug. On rubinius 2.0.0dev (1.9.3 d4b69010 yyyy-mm-dd JI) [x86_64-apple-darwin12.0.0] the select2.js file from the select2-rails gem causes Sprockets to freak out and die due to an invalid encoding. It detects "US-ASCII", when in fact it should be (and indeed, MRI/YARV detects the file to be) UTF-8.

I've proven both points in a completely unscientific "try it in both interpreters with a single exemplar file" test, and made a Gist out of it as well: https://gist.github.com/3344384 The Gist includes the exact file which caused the ruckus; I hope to be able to figure out if it's just something special about that file (not likely) or if it's affecting all files with byte-order-marks (slightly more likely).

@brixen
Rubinius member

This should be fixed. Please reopen if it is not. Duplicates #1818.

@brixen brixen closed this Oct 22, 2012
@mysteriouspants

You can't see this because of Internet, but there are tears of joy in my eyes right now.

Thank you so much!

@brixen
Rubinius member

@NSError heh, thanks, sorry it's taken much longer than I expected. Ruby's encoding system horribly complex. But we'll get there.

@mysteriouspants

Encoding (Ruby aside!) is horribly complex! That you're even willing to tackle this is truly amazing. Keep up the good work!

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