We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
Got an invalid encoding when deal file whose contents is Japanese.
Here is the code:
lines = NKF.nkf('-w', File.read('test.txt')).split(/\r?\n/).map{|line| line.chomp}
Then I got the exception
ArgumentError: invalid encoding nkf at org/jruby/ext/nkf/RubyNKF.java:228 at test.rb:106
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) Client VM 24.80-b11 on 1.7.0_80-b15 +jit [Windows 7-x86]
The text was updated successfully, but these errors were encountered:
@xinqinglxl the above script doesn't reproduce. Works for me.
jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.66-b17 on 1.8.0_66-b17 +jit [darwin-x86_64]
Sorry, something went wrong.
This was fixed for 9.1 in efae5ad.
No branches or pull requests
Got an invalid encoding when deal file whose contents is Japanese.
eg. test.txt (The encoding is UTF-8 without BOM)
テスト#means test
Here is the code:
lines = NKF.nkf('-w', File.read('test.txt')).split(/\r?\n/).map{|line| line.chomp}
Then I got the exception
Environment
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) Client VM 24.80-b11 on
1.7.0_80-b15 +jit [Windows 7-x86]
The text was updated successfully, but these errors were encountered: