Skip to content

Commit

Permalink
added utf-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Kuźma committed May 26, 2009
1 parent 0d08a6a commit b564dbd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.1.0 0.1.1
1 change: 1 addition & 0 deletions lib/vcard/vcard.rb
Expand Up @@ -682,6 +682,7 @@ def Vcard.decode(card)
string = string.unpack('v*').pack('U*') string = string.unpack('v*').pack('U*')
end end


string.force_encoding(Encoding::UTF_8)
entities = Vpim.expand(Vpim.decode(string)) entities = Vpim.expand(Vpim.decode(string))


# Since all vCards must have a begin/end, the top-level should consist # Since all vCards must have a begin/end, the top-level should consist
Expand Down
6 changes: 3 additions & 3 deletions vcard.gemspec
Expand Up @@ -2,7 +2,7 @@


Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = %q{vcard} s.name = %q{vcard}
s.version = "0.1.0" s.version = "0.1.1"


s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jakub Kuźma"] s.authors = ["Jakub Kuźma"]
Expand All @@ -12,7 +12,6 @@ Gem::Specification.new do |s|
"LICENSE", "LICENSE",
"README.rdoc" "README.rdoc"
] ]

s.files = [ s.files = [
".document", ".document",
".gitignore", ".gitignore",
Expand All @@ -29,7 +28,8 @@ Gem::Specification.new do |s|
"lib/vcard/vcard.rb", "lib/vcard/vcard.rb",
"test/field_test.rb", "test/field_test.rb",
"test/test_helper.rb", "test/test_helper.rb",
"test/vcard_test.rb" "test/vcard_test.rb",
"vcard.gemspec"
] ]
s.homepage = %q{http://github.com/qoobaa/vcard} s.homepage = %q{http://github.com/qoobaa/vcard}
s.rdoc_options = ["--charset=UTF-8"] s.rdoc_options = ["--charset=UTF-8"]
Expand Down

0 comments on commit b564dbd

Please sign in to comment.