I\'m working with mails, and names and subjects sometimes come q-encoded, like this:
=?UTF-8?Q?J=2E_Pablo_Fern=C3=A1ndez?=
Is there a way t
Decoding on a line-per-line basis:
line.unpack("M")
Convert STDIN or file provided input of encoded strings into a decoded output:
if ARGV[0] lines = File.read(ARGV[0]).lines else lines = STDIN.each_line.to_a end puts lines.map { |c| c.unpack("M") }.join