Skip to Content

How can I read data correctly from a line-sequential file that has a different encoding from the one used by isCOBOL?

Estimated Reading Time: < 1 Minute

To solve this problem you can normally read the line-sequential file, then before using the contents of the record you can call a specific java function for the translation.

Attached below is a Cobol sample program that reads a file created with UTF8 encoding. For each record call Java class provides the translation into CP1252 encoding.

How can I read data correctly from a line-sequential file that has a different encoding from the one used by isCOBOL?
  • Attached Files
  • encoding.zip (1.29 KB) 14