summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/package.rb
diff options
context:
space:
mode:
authorStefan <[email protected]>2022-09-26 20:16:59 +0200
committerStefan <[email protected]>2022-09-26 20:16:59 +0200
commitbcc88ca556b3b8527ba0ad56424f93ef170b9c31 (patch)
treee6251486043e03f4d7def5dbac4bf043540dbc2a /lib/axlsx/package.rb
parent2ed0f25b31aa7ced3ff4e1f8307424be7624c667 (diff)
downloadcaxlsx-bcc88ca556b3b8527ba0ad56424f93ef170b9c31.tar.gz
caxlsx-bcc88ca556b3b8527ba0ad56424f93ef170b9c31.zip
Make sure all examples and docs use binary mode for reading / writing XLSX files
Not using binary mode can cause encoding issues, see #138.
Diffstat (limited to 'lib/axlsx/package.rb')
-rw-r--r--lib/axlsx/package.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb
index 2faec2e3..ccabf799 100644
--- a/lib/axlsx/package.rb
+++ b/lib/axlsx/package.rb
@@ -99,7 +99,7 @@ module Axlsx
#
# # Serialize to a stream
# s = p.to_stream()
- # File.open('example_streamed.xlsx', 'w') { |f| f.write(s.read) }
+ # File.open('example_streamed.xlsx', 'wb') { |f| f.write(s.read) }
def serialize(output, options = {}, secondary_options = nil)
confirm_valid, zip_command = parse_serialize_options(options, secondary_options)
return false unless !confirm_valid || self.validate.empty?