Loading ...
Sorry, an error occurred while loading the content.

iconv

Expand Messages
  • regli
    I checked out iconv and the Windows compiled version doesn t support codepage IBM-1047. http://gnuwin32.sourceforge.net/packages/libiconv.htm However, it
    Message 1 of 5 , Aug 1, 2009
    • 0 Attachment
      I checked out iconv and the Windows compiled version doesn't support codepage IBM-1047.

      http://gnuwin32.sourceforge.net/packages/libiconv.htm

      However, it appears that the iconv that IBM uses supports it.

      Does anybody have access to the IBM iconv. As it uses the same command line parameters, it would appear to be a legal redistribution.
    • kerravon86
      ... Not sure that conclusion is correct. According to cppcharset.c in gcc 3.4.6: cpplib uses UTF-8 or UTF-EBCDIC for the source character set, depending on
      Message 2 of 5 , Aug 1, 2009
      • 0 Attachment
        --- In hercules-os380@yahoogroups.com, "regli" <regli@...> wrote:
        >
        > I checked out iconv and the Windows compiled version doesn't support codepage IBM-1047.
        >
        > http://gnuwin32.sourceforge.net/packages/libiconv.htm
        >
        > However, it appears that the iconv that IBM uses supports it.
        >
        > Does anybody have access to the IBM iconv. As it uses the
        > same command line parameters, it would appear to be a legal
        > redistribution.

        Not sure that conclusion is correct.

        According to cppcharset.c in gcc 3.4.6:

        cpplib uses UTF-8 or UTF-EBCDIC for the source character set,
        depending on whether the host is based on ASCII or EBCDIC (see
        respectively Unicode section 2.3/ISO10646 Amendment 2, and Unicode
        Technical Report #16). With limited exceptions, it relies on the
        system library's iconv() primitive to do charset conversion
        (specified in SUSv2). */

        ie iconv is part of a standard. The GNU one is just one
        such implementation.

        In addition, it is not listed here:

        https://www-03.ibm.com/servers/eserver/zseries/zos/unix/tools/

        Can't you just write your own? minizip comes with
        a translate table, as does hercules. gcc too. I
        have one in ozpd, but it only handles US keyboard
        characters.

        BFN. Paul.
      • regli
        ... I m not sure either. However, have a look at the command line and it looks exactly the same:
        Message 3 of 5 , Aug 1, 2009
        • 0 Attachment
          --- In hercules-os380@yahoogroups.com, "kerravon86" <kerravon86@...> wrote:
          > > However, it appears that the iconv that IBM uses supports it.
          > >
          > > Does anybody have access to the IBM iconv. As it uses the
          > > same command line parameters, it would appear to be a legal
          > > redistribution.
          >
          > Not sure that conclusion is correct.

          I'm not sure either. However, have a look at the command line and it looks exactly the same:

          http://www-03.ibm.com/servers/eserver/zseries/zos/unix/bpxa1p03.html
          -- iconv -f IBM-1047 -t IS08859-1 words.txt >converted.txt

          -- converts the file words.txt from the IBM-1047 standard code set to -- the ISO 8859-1 standard code set and stores it in the file named -- converted.txt.



          > According to cppcharset.c in gcc 3.4.6:
          >
          > cpplib uses UTF-8 or UTF-EBCDIC for the source character set,
          > depending on whether the host is based on ASCII or EBCDIC (see
          > respectively Unicode section 2.3/ISO10646 Amendment 2, and Unicode
          > Technical Report #16). With limited exceptions, it relies on the
          > system library's iconv() primitive to do charset conversion
          > (specified in SUSv2). */
          >
          > ie iconv is part of a standard. The GNU one is just one
          > such implementation.
          >
          > In addition, it is not listed here:
          >
          > https://www-03.ibm.com/servers/eserver/zseries/zos/unix/tools/

          Interesting. I wonder why not as they reference it in several places.

          > Can't you just write your own? minizip comes with
          > a translate table, as does hercules. gcc too. I
          > have one in ozpd, but it only handles US keyboard
          > characters.

          I was hoping to use iconv or something similar as it allows for multiple character set conversions. I thought that the IBM version would include all the codepage conversions Hercules supports plus possibly some Unicode to DBCS conversions.

          However, I definitely can make my life a lot easier by just supporting a single conversion, i.e. 819/1047. In that case I'd just do it Rexx. I was hoping for a more generalized implementation but don't want to spend too mcuh time on it either.

          p.s. I did install gcc 3.4.4 with Eclipse Galileo (3.5) and CDT 6.0. Still a few things to work out but I just conducted my initial debugging session.
        • kerravon86
          ... Right, as I would expect: http://en.wikipedia.org/wiki/List_of_Unix_programs for something that is part of the IEEE Std 1003.1-2004.
          Message 4 of 5 , Aug 1, 2009
          • 0 Attachment
            --- In hercules-os380@yahoogroups.com, "regli" <regli@...> wrote:
            >
            > --- In hercules-os380@yahoogroups.com, "kerravon86" <kerravon86@> wrote:
            > > > However, it appears that the iconv that IBM uses supports it.
            > > >
            > > > Does anybody have access to the IBM iconv. As it uses the
            > > > same command line parameters, it would appear to be a legal
            > > > redistribution.
            > >
            > > Not sure that conclusion is correct.
            >
            > I'm not sure either. However, have a look at the command
            > line and it looks exactly the same:
            >
            > http://www-03.ibm.com/servers/eserver/zseries/zos/unix/bpxa1p03.html
            > -- iconv -f IBM-1047 -t IS08859-1 words.txt >converted.txt
            >
            > -- converts the file words.txt from the IBM-1047 standard code set to -- the ISO 8859-1 standard code set and stores it in the file named -- converted.txt.

            > > system library's iconv() primitive to do charset conversion
            > > (specified in SUSv2). */

            Right, as I would expect:

            http://en.wikipedia.org/wiki/List_of_Unix_programs

            for something that is part of the IEEE Std 1003.1-2004.

            http://www.opengroup.org/onlinepubs/000095399/utilities/iconv.html

            > > ie iconv is part of a standard. The GNU one is just one
            > > such implementation.
            > >
            > > In addition, it is not listed here:
            > >
            > > https://www-03.ibm.com/servers/eserver/zseries/zos/unix/tools/
            >
            > Interesting. I wonder why not as they reference it in
            > several places.

            Because it isn't ported 3rd-part software. It's a
            home-grown implementation of the Posix standard.

            > > Can't you just write your own? minizip comes with
            > > a translate table, as does hercules. gcc too. I
            > > have one in ozpd, but it only handles US keyboard
            > > characters.
            >
            > I was hoping to use iconv or something similar as it
            > allows for multiple character set conversions. I
            > thought that the IBM version would include all the
            > codepage conversions Hercules supports plus possibly
            > some Unicode to DBCS conversions.

            It may well do, which is why they want you to buy
            their implementation. :-)

            > However, I definitely can make my life a lot easier by just
            > supporting a single conversion, i.e. 819/1047. In that
            > case I'd just do it Rexx. I was hoping for a more generalized
            > implementation but don't want to spend too mcuh time on it
            > either.

            Just create your own iconv in rexx with a single
            codepage conversion for now, and plug in a
            replacement if one becomes available?

            I don't think there's going to be much call for a
            conversion other than the normal 819/1047. Hands
            up who likes having their vertical bars trashed.

            > p.s. I did install gcc 3.4.4 with Eclipse Galileo
            > (3.5) and CDT 6.0. Still a few things to work out
            > but I just conducted my initial debugging session.

            Ok. Obviously for just compiling simple programs
            as part of a universal language, you would hopefully
            not need to do debugging. :-)

            BFN. Paul.
          • regli
            ... Universal it is! My preferred language it isn t and productive it is definitely not. ;)
            Message 5 of 5 , Aug 1, 2009
            • 0 Attachment
              --- In hercules-os380@yahoogroups.com, "kerravon86" <kerravon86@...> wrote:
              >
              > Ok. Obviously for just compiling simple programs
              > as part of a universal language, you would hopefully
              > not need to do debugging. :-)

              Universal it is! My preferred language it isn't and productive it is definitely not. ;)
            Your message has been successfully submitted and would be delivered to recipients shortly.