# open up Vpim's DirectoryInfo::Field class
alias_method :orig_create, :create
# we overwrite Field.create for setting the CHARSET
# specify the lines you don't want to add a charset to
lines_to_ignore = %w(BEGIN END VERSION)
params.merge!({'CHARSET' => 'ISO-8859-1'}) unless lines_to_ignore.include? name
orig_create(name, value, params)
end
end
end
end
end
Wednesday, October 1, 2008
Add a character set to Vpim's Vcard-Export
If you are using Vpim to export Vcards and ever need to include a character set on your lines in the generated Vcard-file, here's how to do it:
Subscribe to:
Post Comments (Atom)
1 comment:
Saved me, thanks.
Post a Comment