MIME B encoding decoder
- D
- H
- K
- L
- M
- N
- P
- S
- T
- W
ENCODED_WORDS | = | /#{encoded}(?:\s+#{encoded})*/i |
OUTPUT_ENCODING | = | { 'EUC' => 'e', 'SJIS' => 's', } |
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 89 def self.decode( str, encoding = nil ) encoding ||= (OUTPUT_ENCODING[$KCODE] || 'j') opt = '-m' + encoding str.gsub(ENCODED_WORDS) {|s| NKF.nkf(opt, s) } end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 95 def initialize( dest, encoding = nil, eol = "\n" ) @f = StrategyInterface.create_dest(dest) @encoding = (%r\A[ejs]/ === encoding) ? encoding[0,1] : nil @eol = eol end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 117 def header_body( str ) @f << decode(str) end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 109 def header_line( str ) @f << decode(str) end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 113 def header_name( nm ) @f << nm << ': ' end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 143 def kv_pair( k, v ) @f << k << '=' << v end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 127 def lwsp( str ) @f << str end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 131 def meta( str ) @f << str end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 139 def phrase( str ) @f << quote_phrase(decode(str)) end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 147 def puts( str = nil ) @f << str if str @f << @eol end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 121 def space @f << ' ' end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 106 def terminate end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 135 def text( str ) @f << decode(str) end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb, line 152 def write( str ) @f << str end