charkost/prosopite

Please the output character encoding to be UTF-8.

rhiroe opened this issue · 1 comments

prosopite/lib/prosopite.rb

Lines 161 to 163 in 4dc489c

File.open(File.join(Rails.root, 'log', 'prosopite.log'), 'a') do |f|
f.puts(notifications_str)
end

The character encoding of notifications_str here is ASCII-8BIT, so it fails to be converted to UTF-8 when writing the file.
Can you please change the output character encoding to UTF-8?

@rhiroe Is this because the string contains the escape sequence to mark things as red? https://github.com/charkost/prosopite/blob/main/lib/prosopite.rb#L200

If so, you can use a custom logger to avoid that: https://github.com/charkost/prosopite#custom-logging-configuration