forked from wikiti/deepl-rb
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary: when trying to download translated file, raises an error:
reproduce steps:
#rails console
test-app(dev)> doc = Rails.root.join("storage", "files", "file_name.pdf")
=> "full/path/to/file.pdf"
...
test-app(dev)> doc_handle = DeepL.document.upload(doc, 'EN', 'UK')
=>
#<DeepL::Resources::DocumentHandle:0x000079d53d473c68
...
test-app(dev)> DeepL.document.download(doc_handle, Rails.root.join("storage", "files", "translated.pdf"))
/home/user/.rbenv/versions/3.4.1/lib/ruby/gems/3.4.0/gems/irb-1.14.3/lib/irb.rb:1262:in 'full_message': "\xC8" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
Actual Result (AR): Raises an error.
Expected Result (ER): The file is downloaded successfully.
Rails 7.2.2
Ruby 3.4.1
Metadata
Metadata
Assignees
Labels
No labels