Sha256: 2710e9849d88b42f0528c9acbeffe93e1d662de7ec94d29803c5cabea12c2cfb
Contents?: true
Size: 642 Bytes
Versions: 25
Compression:
Stored size: 642 Bytes
Contents
# encoding: utf-8 module Mail module Encodings class QuotedPrintable # Decode the string from Quoted-Printable def self.decode(str) str.unpack("M*").first end def self.encode(str) str.gsub( /[^a-z ]/i ) { quoted_printable_encode($&) } end private # Convert the given character to quoted printable format, taking into # account multi-byte characters (if executing with $KCODE="u", for instance) def self.quoted_printable_encode(character) result = "" character.each_byte { |b| result << "=%02X" % b } result end end end end
Version data entries
25 entries across 25 versions & 2 rubygems