79516952

Date: 2025-03-18 09:50:31
Score: 1
Natty:
Report link

For Ruby to handle MS Excel issue with UTF encoding for German characters I used this approach:

UTF8_BOM = "\uFEFF".freeze
def to_csv
  CSV.generate(headers: true) do |csv|
    csv << csv_headers
    csv << csv_data
  end.prepend(UTF8_BOM)
end
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Yaroslav Yenkala