JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-6055

SFTP Transport does not handle encoding correctly for outgoing messages of type String

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 3.2.1
  • Fix Version/s: None
  • Component/s: Transport: FTP / SFTP
  • Labels:
    None
  • User impact:
    Medium
  • Similar Issues:
    None

Description

When converting from String to byte[] in SftpMessageDispatcher.doDispatch default platform encoding is used.

inputStream = new ByteArrayInputStream(((String) data).getBytes());

should be changed to

inputStream = new ByteArrayInputStream(((String) data).getBytes(event.getEncoding()));

Workaround is to configure a string-to-byte-array transformer before the sftp outbound endpoint that uses the desired encoding.

<string-to-byte-array-transformer encoding="UTF-8"/>
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    SftpMessageDispatcher.java.patch
    02/Feb/12 03:32 AM
    0.5 kB
    Pär Wenåker

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds

People

  • Assignee:
    Unassigned
    Reporter:
    Pär Wenåker
Vote (4)
Watch (2)

Dates

  • Created:
    02/Feb/12 03:17 AM
    Updated:
    04/Apr/12 01:20 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.