Fixed bug #1349: OTRS Import fails with "incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)".
This commit is contained in:
parent
78a98ab51e
commit
ec94c72a6b
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,7 @@ module Import
|
|||
Store.add(
|
||||
object: 'Ticket::Article',
|
||||
o_id: local_article.id,
|
||||
filename: decoded_filename,
|
||||
filename: decoded_filename.force_encoding('utf-8'),
|
||||
data: decoded_content,
|
||||
preferences: {
|
||||
'Mime-Type' => attachment['ContentType'],
|
||||
|
@ -54,6 +54,9 @@ module Import
|
|||
sleep rand 3
|
||||
retry if !(retries -= 1).zero?
|
||||
raise
|
||||
rescue => e
|
||||
log "Ticket #{local_article.ticket_id} - #{sha} - #{e}: #{attachment.inspect}"
|
||||
raise
|
||||
ensure
|
||||
queue_cleanup(sha)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue