ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

IFS and convertion UTF-8

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

  • IFS and convertion UTF-8

    hello,

    I have a problem with stream file which its creating in IFS path, I need to convert this file in UTF-8.
    //
    I'm using QC2LE for preparetion files.
    //
    Is It possible ?

    Malaga5

  • #2
    Re: IFS and convertion UTF-8

    Look here.
    It's just a matter of CCSID's.
    UTF-8 is CCSID 1208 and EBCDIC is CCSID 037 (for us-english).
    Philippe

    Comment


    • #3
      Re: IFS and convertion UTF-8

      thanks,

      but , I have already seen this examples.
      I would like to use CCSID in RPGLE code if its possible.

      I found this code , but in my program this file prepared emty file, why...?

      openflags = O_CREATE + O_WRTONLY + O_TRUNCATE + O_CCSID;
      mode = S_IRWXU + S_READWRITE;
      CCSID_UTF8 = 1208;
      fd = open( myfile
      : openflags
      : mode
      : CCSID_UTF8);

      Comment


      • #4
        Re: IFS and convertion UTF-8

        What version of the OS is running on your server?
        "Time passes, but sometimes it beats the <crap> out of you as it goes."

        Comment


        • #5
          Re: IFS and convertion UTF-8

          our iSeries has V5R2

          Comment


          • #6
            Re: IFS and convertion UTF-8

            Try adding O_TEXTDATA to your openflags and see what happens.
            "Time passes, but sometimes it beats the <crap> out of you as it goes."

            Comment

            Working...
            X