Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-125

[net] FTP does not work on zos (ebcdic platform)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Nightly Builds
    • 2.0
    • None
    • None
    • Operating System: other
      Platform: Other

    • 31108

    Description

      This was done with 1.3.0-dev source

      The FromNetAscIIInputStream.java constructor

      has a string version of the line separator seq ("\r\n")

      and also a byte array version created with :
      _lineSeparatorBytes = _lineSeparator.getBytes();
      On an ebcdic platform this will result in garbage in the _lineseparatorBytes
      and subsequent calls to readLine will timeout because that garbage sequence
      will never be in the "control" inputStream (ASCII by definition)

      I bypassed this by adding encoding of ISO-8859-1 to the initialization of
      _lineSeparatorBytes..
      and removing the "final" from the initial declaration

      I also swallowed the (almost not possible) UnsupportedEncodingException.

      There is probably a better way to do this as an "official" fix.
      Thanks in advance

      Stan Long
      slong@seebeyond.com

      Attachments

        Activity

          People

            Unassigned Unassigned
            slong@seebeyond.com Stan Long
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: