Skip to content

Commit

Permalink
Write source and stdin as binary to avoid UTF-8 problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanzdosilovic committed Feb 14, 2019
1 parent b25153e commit 519efbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/jobs/isolate_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def init
end

def write
File.open(source, 'w:UTF-8') { |f| f.write(submission.source_code) }
File.open(stdin, 'w:UTF-8') { |f| f.write(submission.stdin) }
File.open(source, "wb") { |f| f.write(submission.source_code) }
File.open(stdin, "wb") { |f| f.write(submission.stdin) }
end

def compile
Expand Down

0 comments on commit 519efbe

Please sign in to comment.