Skip to content

Unable to to create files in binmode. #19

Description

@vitaliiorlov

Describe the bug

Unable to write binary files. Got Encoding::UndefinedConversionError: "\x89" from ASCII-8BIT to UTF-8 error.

To Reproduce

Dry::Files.new.write(
  "image.png",
  result[:io].force_encoding(Encoding::BINARY)
)

Expected behavior

Works as File.binwrite()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions