Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/vpim/rfc2425.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- encoding : utf-8 -*-
# -*- encoding : binary -*-
=begin
Copyright (C) 2008 Sam Roberts

Expand Down Expand Up @@ -299,11 +299,11 @@ def Vpim.encode_paramtext(value)
end

def Vpim.encode_paramvalue(value)
case value
case value.force_encoding("BINARY")
when %r{\A#{Bnf::SAFECHAR}*\z}
value
value.force_encoding("utf-8")
when %r{\A#{Bnf::QSAFECHAR}*\z}
'"' + value + '"'
'"' + value.force_encoding("utf-8") + '"'
else
raise Vpim::Unencodeable, "param-value #{value.inspect}"
end
Expand Down