# File lib/mail/version_specific/ruby_1_9.rb, line 94 def Ruby19.fix_encoding(encoding) case encoding # ISO-8859-15, ISO-2022-JP and alike when /iso-?(\d{4})-?(\w{1,2})/i then return "ISO-#{$1}-#{$2}" # "ISO-2022-JP-KDDI" and alike when /iso-?(\d{4})-?(\w{1,2})-?(\w*)/i then return "ISO-#{$1}-#{$2}-#{$3}" # UTF-8, UTF-32BE and alike when /utf-?(\d{1,2})?(\w{1,2})/i then return "UTF-#{$1}#{$2}" # Windows-1252 and alike when /Windows-?(.*)/i then return "Windows-#{$1}" #more aliases to be added if needed else return encoding end end