File: encoding_helpers.rb

package info (click to toggle)
ruby-prawn 2.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,320 kB
  • sloc: ruby: 15,654; sh: 43; makefile: 20
file content (9 lines) | stat: -rw-r--r-- 180 bytes parent folder | download
1
2
3
4
5
6
7
8
9
module EncodingHelpers
  def win1252_string(str)
    str.force_encoding(Encoding::Windows_1252)
  end

  def bin_string(str)
    str.force_encoding(Encoding::ASCII_8BIT)
  end
end