Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make default encoding type => "UTF-8". Fix issue #26

  • Loading branch information...
commit 4311a688a5e72f2ff3423d4b5129d02ffdb6b95d 1 parent 9fec22a
@jdpace jdpace authored
Showing with 7 additions and 1 deletion.
  1. +2 −1  lib/pdfkit/configuration.rb
  2. +5 −0 spec/pdfkit_spec.rb
View
3  lib/pdfkit/configuration.rb
@@ -11,7 +11,8 @@ def initialize
:margin_top => '0.75in',
:margin_right => '0.75in',
:margin_bottom => '0.75in',
- :margin_left => '0.75in'
+ :margin_left => '0.75in',
+ :encoding => "UTF-8"
}
end
end
View
5 spec/pdfkit_spec.rb
@@ -34,6 +34,11 @@
end
end
+ it "should default to 'UTF-8' encoding" do
+ pdfkit = PDFKit.new('Captación')
+ pdfkit.options['--encoding'].should == 'UTF-8'
+ end
+
it "should not have any stylesheedt by default" do
pdfkit = PDFKit.new('<h1>Oh Hai</h1>')
pdfkit.stylesheets.should be_empty
Please sign in to comment.
Something went wrong with that request. Please try again.