Skip to content
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

LoadError with compiled multi-byte symbol #4659

Closed
jakago opened this issue Jun 9, 2017 · 3 comments
Closed

LoadError with compiled multi-byte symbol #4659

jakago opened this issue Jun 9, 2017 · 3 comments

Comments

@jakago
Copy link

jakago commented Jun 9, 2017

multibytesymbol.rb

# coding: utf-8

# :α.to_s.bytes => [206, 177]
p :α  

run with jruby 9.1.9.0

$ jruby multibytesymbol.rb
:α

compile and run with jruby 9.1.9.0

$ jrubyc multibytesymbol.rb
$ jruby multibytesymbol.class
LoadError: multibytesymbol.class is not compiled Ruby; use java_import to load normal classes
@headius
Copy link
Member

headius commented Jun 9, 2017

Again another possible persistence bug. @enebo

@enebo
Copy link
Member

enebo commented Jun 12, 2017

The fix from #4662 sort of makes this no longer totally fail but it is broken because we save a string without knowing the encoding and then read it back into the file.coding j.l.String. Symbol assumes iso8859_1 so it gets bungled.

I marked this against 9.2 since we have 2 side branches changing our internals to be based on either (ByteList or RubySymbol - an ongoing discussion). What we have to date is pushing a ByteList through the parser. So we have proper encoding info at our disposal we just need to convert the planet to using what format we pick and all will be fixed for good.

@headius
Copy link
Member

headius commented May 16, 2018

Fixed in 9.2 by @enebo symbol work.

@headius headius closed this as completed May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants