ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

XML-SAX - Error code 6

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Generally speaking, other systems besides IBM i have no concept of CCSIDs. How to recognize the particular character encoding of a given file is logic inside the application itself, rather than an OS setting.

    This creates a challenge when it comes to transfering to IBM i. The FTP network protocol is telling it to put data inside of a file, but has no concept of a CCSID, so what should the IBM i mark the file as? what it does is take a default value. This default value is USUALLY based on the ASCII equivalent of your system's CCSID. For CCSID 37 (which is what we use in the USA) the ASCII CCSID that supports all of the same characters is CCSID 819. That's true of many of the western-world CCSIDs, they use 819 as the ASCII equivalent, so 819 becomes the default.

    That does NOT mean that FTP interpreted the document and figured it out. Its just using it because its the default.

    It also does NOT mean that FTP "translated" anything. It wasn't told what it was, so it had to mark it with SOMETHING, and it took the default.

    It is up to you to mark it with the correct CCSID. FTP doesn't know, it lacks human intelligence.

    Comment


    • #17
      Yeah from what I read and my testing it seems to just bring it in and "label" it as 819 when in fact it's 1252 - as you've basically said; it's just being told what to do and as in this instance it's wrong.

      Is it possible translate an IFS file from one CCSID to another? I can't seem to find any APIs to do it.

      I'm just off to write something that uses CHGATR and CPY but it's kinda messy.

      Comment


    • #18
      The CPY command will translate an IFS file between CCSIDs, we've already been discussing this.

      The CHGATR command allows you to change the CCSID the file is labeled as without translating it. We've already been discussing this as well.

      I suppose you could also do this with the IFS APIs, but I don't understand why you'd want to. The CPY and CHGATR commands do everything you need to do. Why are they "messy"?

      Comment


      • #19
        Yeah not sure why I went down the iconv path, over complicating things - I reverted to CPY/CHGATR.

        I just think building commands with QCMDEXC looks messy, idk lol

        Thanks again for your help.

        Comment

        Working...
        X