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

UndefinedConversionError: "\x81" to UTF-8 in conversion from Windows-1252 to UTF-8 to crlf_newline #1

Closed
christianschneider89 opened this issue Sep 4, 2019 · 2 comments

Comments

@christianschneider89
Copy link

christianschneider89 commented Sep 4, 2019

Hello

When I run the script I get an error:

Error occured in provided block:
(Encoding::UndefinedConversionError) "\x81" to UTF-8 in conversion from Windows-1252 to UTF-8 to crlf_newline
org.jruby.exceptions.RaiseException: (Encoding::UndefinedConversionError) "\x81" to UTF-8 in conversion from Windows-1252 to UTF-8 to crlf_newline
	at org.jruby.RubyIO.write(org/jruby/RubyIO.java:1456)
	at org.jruby.RubyIO.write(org/jruby/RubyIO.java:1428)
	at org.jruby.RubyIO.write(org/jruby/RubyIO.java:2584)
	at org.jruby.RubyIO.puts(org/jruby/RubyIO.java:2451)
	at C_3a_.ProgramData.Nuix.Scripts.AnnotationHistoryReviewReport_v1_dot_1_dot_0.AnnotationHistoryReviewReport_dot_nuixscript.AnnotationHistoryReportGenerator.block in generate_item_details(C:/ProgramData/Nuix/Scripts/AnnotationHistoryReviewReport_v1.1.0/AnnotationHistoryReviewReport.nuixscript/AnnotationHistoryReportGenerator.rb:160)
	at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1156)
	at C_3a_.ProgramData.Nuix.Scripts.AnnotationHistoryReviewReport_v1_dot_1_dot_0.AnnotationHistoryReviewReport_dot_nuixscript.AnnotationHistoryReportGenerator.generate_item_details(C:/ProgramData/Nuix/Scripts/AnnotationHistoryReviewReport_v1.1.0/AnnotationHistoryReviewReport.nuixscript/AnnotationHistoryReportGenerator.rb:159)
	at C_3a_.ProgramData.Nuix.Scripts.AnnotationHistoryReviewReport_v1_dot_1_dot_0.AnnotationHistoryReviewReport_dot_nuixscript.AnnotationHistoryReportGenerator.item_detail_relative_path(C:/ProgramData/Nuix/Scripts/AnnotationHistoryReviewReport_v1.1.0/AnnotationHistoryReviewReport.nuixscript/AnnotationHistoryReportGenerator.rb:145)
	at RUBY.block in result((erb):37)
	at RUBY.<eval>((erb):34)
	at org.jruby.RubyKernel.eval(org/jruby/RubyKernel.java:994)
	at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.erb.result(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/erb.rb:864)
	at C_3a_.ProgramData.Nuix.Scripts.AnnotationHistoryReviewReport_v1_dot_1_dot_0.AnnotationHistoryReviewReport_dot_nuixscript.AnnotationHistoryReportGenerator.generate_event_details(C:/ProgramData/Nuix/Scripts/AnnotationHistoryReviewReport_v1.1.0/AnnotationHistoryReviewReport.nuixscript/AnnotationHistoryReportGenerator.rb:135)
	at RUBY.block in result((erb):33)
	at RUBY.each(C:/ProgramData/Nuix/Scripts/AnnotationHistoryReviewReport_v1.1.0/AnnotationHistoryReviewReport.nuixscript/CaseHistoryHelper.rb:29)
	at org.jruby.RubyEnumerable.each_with_index(org/jruby/RubyEnumerable.java:1067)
	at RUBY.<eval>((erb):30)
	at org.jruby.RubyKernel.eval(org/jruby/RubyKernel.java:994)
	at RUBY.result(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/erb.rb:864)
	at RUBY.generate_report(C:/ProgramData/Nuix/Scripts/AnnotationHistoryReviewReport_v1.1.0/AnnotationHistoryReviewReport.nuixscript/AnnotationHistoryReportGenerator.rb:58)
	at RUBY.block in (root)(C:\ProgramData\Nuix\Scripts\AnnotationHistoryReviewReport_v1.1.0\AnnotationHistoryReviewReport.nuixscript\AnnotationHistoryReviewReport.rb:57)
	at RUBY.<main>(C:\ProgramData\Nuix\Scripts\AnnotationHistoryReviewReport_v1.1.0\AnnotationHistoryReviewReport.nuixscript\AnnotationHistoryReviewReport.rb:53)

The processing stops after showing the error.
I used the release version and the master version of the script.

Best regards

Chris

@JuicyDragon
Copy link
Collaborator

Hello Chris,

I tried a little to reproduce, but encoding issues can be tricky to troubleshoot sometimes. So I went through and made some changes I hope will address your issue. A new release can be obtained here:
https://github.com/Nuix/Annotation-History-Review-Report/releases/tag/v1.2.0

Give that a test and please let me know if it addresses the error you are seeing.

@christianschneider89
Copy link
Author

Hello JuicyDragon

It does work. Thank you!

Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants