Skip to Content
avatar image
Former Member

Getting junk data in the output file in UNIX server due to UNICODE error.

Hi All,

I am working on an Upgradation project from 4.7 to mySAP ERP 2005.

IN 4.7 we are using

OPEN DATASET lv_filename FOR OUTPUT IN BINARY MODE. and getting the file as required.

In ECC 6.0 for the same OPEN DATASET statement ,the output file in unix server has the junk data having the characters like #<##d9{y#+G9###T>j(##^# #K## #q### #####.

Pls help me in this issue to proceed further .

Thanks,

Chakradhar.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 22, 2007 at 04:26 PM

    This is not "junk" but an UTF-8 encoded file, the system, that reads the data must be made aware of that (means, you can't use notepad to display the file).

    The "open dataset" opens a file in default codepage, which is, on a Unicode system and UTF-8 file with the endianess of the creating system.

    If you want to export the data in a certain codepage you need to put that into the open dataset statement.

    open dataset for output in legacy binary mode [little|big] endian code page <codepage>.

    However, this will work for only ONE codepage, if you use multiple codepages in the export file you need to make the recieving system aware of UTF-8/UCS-2 (which I would recommend).

    --

    Markus

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Markus Doehr

      If i use "open dataset for output in binary mode non-unicode " , i am getting syntax errors . If we use non- unicode ,there should be encoding in the middle of mode and non-unicode. And encoding is only possible in text mode.

      I used "OPEN DATASET lv_filename FOR OUTPUT IN legacy BINARY MODE ignoring conversion errors. " Will this work.

      Now the customer is testing the file in ECC 6.0.

      Will get back to you if there are further issues.

      Thanks,

      Chakradhar.