def to_iso_8859_15(content)
array_utf8 = content.unpack('U*')
array_enc = []
array_utf8.each do |num|
case num
when 0..0xA3; array_enc << num
when 0xA4; array_enc << '¤'
when 0xA6; array_enc << '¦'
when 0xA8; array_enc << '¨'
when 0xB4; array_enc << '´'
when 0xB8; array_enc << '¸'
when 0xBC; array_enc << '¼'
when 0xBD; array_enc << '½'
when 0xBE; array_enc << '¾'
when 0x20AC; array_enc << 0xA4
when 0x0160; array_enc << 0xA6
when 0x0161; array_enc << 0xA8
when 0x017D; array_enc << 0xB4
when 0x017E; array_enc << 0xB8
when 0x0152; array_enc << 0xBC
when 0x0153; array_enc << 0xBD
when 0x0178; array_enc << 0xBE
else
if num <= 0xFF
array_enc << num
else
array_enc.concat "&\##{num};".unpack('C*')
end
end
end
array_enc.pack('C*')
end