ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How do I tell the expected encoding for a web instance

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

  • How do I tell the expected encoding for a web instance

    My understanding is an IBMi web instance can be configured as to what encoding it expects the incoming data to be in (ASCII, UTF-8, etc)

    If so, where can I see this setting?

  • #2
    Which HTTP server are you referring to?

    Comment


    • #3
      I don't understand the question.

      Our IBM I has web/http server instances set up, so I can go to http://myIBMi:1234/someName/myPgm.pgm and get a page generated by RPGLE CGI program MYPGM

      Comment


      • #4
        I assume he's talking about Apache.

        Comment


        • #5
          That sounds right

          Comment


          • #6
            So you are running the IBM HTTP Server (powered by Apache), 5570-DG1? Not Tomcat, WAS, Nginx, IAS, IWS ... or any of the myriad other HTTP servers?

            That being the case, the configuration file is located under /www/THE-INSTANCE-NAME/conf/httpd.conf by default. In that file, you may find a directive like this:
            Code:
            DefaultNetCCSID 1208
            DefaultFsCCSID 37
            This means that it will translate between CCSID 37 (USA EBCDIC) and CCSID 1208 (UTF-8).

            If DefaultFsCCSID isn't there, it uses the system's default CCSID for EBCDIC.
            If DefaultNetCCSID isn't there, I think it uses CCSID 819 (but don't quote me on that.)

            Comment


            • #7
              The instance config is indeed /www/THE-INSTANCE-NAME/conf/httpd.conf so I assume it is Apache.

              I have never noticed Default**CCSID directives in instance config before, so I assume they must be ASCII 819. I will double check when I get to work

              Comment


              • #8
                Checked, and I have found that most instances are not specifying DefaultNetCCSID. According to https://www.ibm.com/support/knowledg...e/rzaiepdf.pdf page 303/304, that means the default is CCSID 819 ASCII unless changed with CHGHTTPA

                Is there a way to see the current values of CHGHTTPA attributes? If I prompt the command I just see *SAME for everything, and there is no DSPHTTPA equivalent

                Comment


                • #9
                  Make sure the user has enough privileges. I've seen that in the past where it shows *SAME for some users, but admin profiles show the values.

                  Comment


                  • Scott M
                    Scott M commented
                    Editing a comment
                    That is the case, when I prompt it I get all the values.

                • #10
                  That would make sense, I will ask an operator to check for me

                  Thanks all

                  Comment

                  Working...
                  X