File: encoding_helpers.rb

package info (click to toggle)
ruby-prawn 2.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,380 kB
  • sloc: ruby: 15,820; sh: 43; makefile: 20
file content (11 lines) | stat: -rw-r--r-- 219 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module EncodingHelpers
  def win1252_string(str)
    str.dup.force_encoding(Encoding::Windows_1252)
  end

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