# File lib/vpim/field.rb, line 312 def value case encoding when nil, '8BIT', '7BIT' then @value # Hack - if the base64 lines started with 2 SPC chars, which is invalid, # there will be extra spaces in @value. Since no SPC chars show up in # b64 encodings, they can be safely stripped out before unpacking. when 'B', 'BASE64' then @value.gsub(' ', '').unpack('m*').first when 'QUOTED-PRINTABLE' then @value.unpack('M*').first else raise Vpim::InvalidEncodingError, "unrecognized encoding (#{encoding})" end end