Skip to content

Commit

Permalink
Merge pull request #252 from autolab/fix_encoding_errors
Browse files Browse the repository at this point in the history
Temp Fix for some encoding errors
  • Loading branch information
Ilter committed Feb 5, 2015
2 parents 275e615 + b6b6947 commit 36649fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def annotated_file(file, filename, position)
conditions[:position] = position if position
annotations = self.annotations.where(conditions)

result = file.lines.map { |line| [line, nil] }
result = file.lines.map { |line| [line.force_encoding("UTF-8"), nil] }

# annotation lines are one-indexed, so adjust for the zero-indexed array
annotations.each { |a| result[a.line-1][1] = a}
Expand Down

0 comments on commit 36649fe

Please sign in to comment.