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

uncaught throw `encoding_found' in JRuby #673

Closed
nirvdrum opened this issue May 8, 2012 · 3 comments
Closed

uncaught throw `encoding_found' in JRuby #673

nirvdrum opened this issue May 8, 2012 · 3 comments

Comments

@nirvdrum
Copy link

nirvdrum commented May 8, 2012

Hi,

I just upgraded to 1.5.3rc5 and started seeing:

ArgumentError:
  uncaught throw `encoding_found'
  # nokogiri/XmlSaxParserContext.java:241:in `parse_with'

It's a bit tricky to reproduce, but I think a reliable way is to save an HTML doc to disk without any any BOM or encoding info in the file. Load the file into JRuby in 1.9 mode so it should have an encoding of "ASCII-8BIT". Now just do Nokogiri::HTML(File.open('junk_file').read) and you should get the exception. Note that the test file I'm using does have newlines in it. I'm not quite sure what character is throwing it off. If I change the encoding to UTF-8, Nokogiri is able to construct the document just fine.

@yokolet
Copy link
Member

yokolet commented May 31, 2012

I'm aware of this. Nokogiri test on JRuby 1.9 mode always throws this error message. I'll work on this.

@nirvdrum
Copy link
Author

Confirming that this is still an issue in 1.5.5.rc1.

@yokolet
Copy link
Member

yokolet commented Jun 12, 2012

Sorry, I couldn't make it in 1.5.5.rc1. But, I fixed this in rev. c085082, so 1.5.5.rc2 or 1.5.5 will have the fix.

Thanks for reporting the bug.

@yokolet yokolet closed this as completed Jun 12, 2012
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

2 participants