z/OS Tools & Language

Expand all | Collapse all

Git - fatal, incomplete multibyte sequence encountered

  • 1.  Git - fatal, incomplete multibyte sequence encountered

    Posted 04-20-2020 01:36

    Hello,

    we are working with Git Version 2.14.4 on z/OS 2.3 and have some troubles with codepage conversion. When we try to clone the checkout abends for some repositories with following message:
    Cloning into ‘Generelle-Module’…
    remote: Enumerating objects: 3753, done.
    remote: Counting objects: 100% (3753/3753), done.
    remote: Compressing objects: 100% (1564/1564), done.
    remote: Total 3753 (delta 1868), reused 3753 (delta 1868), pack-reused 0
    Receiving objects: 100% (3753/3753), 2.94 MiB | 15.58 MiB/s, done.
    Resolving deltas: 100% (1868/1868), done.
    fatal: inactive/asm/ELSE040.asm: incomplete multibyte sequence encountered
    while converting from utf-8
    warning: Clone succeeded, but checkout failed.

    File ELSE040.asm e.g. contains EBCDIC char x’AB’ but the utf-8 encondings seems to be correct. Other tools like iconvs or RTC are working correct with ELSE040.asm .

    Our .gitattributes file:

    • text=auto
      

    *.pdf binary
    usermac/ zos-working-tree-encoding=IBM-1141 git-encoding=utf-8
    *.asm zos-working-tree-encoding=IBM-1141 git-encoding=utf-8
    *.cbl zos-working-tree-encoding=IBM-1141 git-encoding=utf-8
    *.cpy zos-working-tree-encoding=IBM-1141 git-encoding=utf-8
    *.c zos-working-tree-encoding=IBM-1047 git-encoding=utf-8
    *.cpp zos-working-tree-encoding=IBM-1047 git-encoding=utf-8
    *.h zos-working-tree-encoding=IBM-1047 git-encoding=utf-8
    *.hpp zos-working-tree-encoding=IBM-1047 git-encoding=utf-8
    *.sh zos-working-tree-encoding=IBM-1047 git-encoding=utf-8

    The same problem occurs with zos-working-tree-encoding 1047 for *.asm.
    In another Repository I have a file with all character (x’00 – x’ff) with the same attributes-file
    and get not errors!?

    Thanks a lot in advance.

    Best regards,
    Joerg



  • 2.  RE: Git - fatal, incomplete multibyte sequence encountered

    Posted 04-21-2020 02:22

    Hello Joerg,

    These encoding combinations are not supported by Git on z/OS. You can try to change git-encoding to ISO8859-1:

    *.asm zos-working-tree-encoding=IBM-1141 git-encoding=ISO8859-1

    It should work fine for both zos-working-tree-encoding=IBM-1141 and zos-working-tree-encoding=IBM-1047.

    Thanks,
    Vladimir



  • 3.  RE: Git - fatal, incomplete multibyte sequence encountered

    Posted 05-25-2020 10:17

    Hello Vladimir,

    at the moment we are not really happy with iso8859-1. Our company is used to work with ut8 and a new codepage makes life more complicate especially for z Dinosaurs like me and some other colleagues. For this reasons we think about to write a wrapper to use iconv and convert by ourselves from utf8 to EBCEDIC. But I don’t really like such workarounds
    Maybe you will support utf8 for the upcoming version 2.18? If yes, do you already have a release date for the next port?

    Best regards,
    Jörg



  • 4.  RE: Git - fatal, incomplete multibyte sequence encountered

    Posted 04-21-2020 08:23

    Hello Vladimir,

    thanks a lot for the information. Iso8859-1 was the solution and everything works fine now.

    Best regards,
    Jörg



  • 5.  RE: Git - fatal, incomplete multibyte sequence encountered

    Posted 05-26-2020 00:21

    Hello Jörg,

    We know that current support for encodings in Git is limited, and are trying to do our best to improve it. We have many customers looking forward to national charsets support. Currently we are working on a newer version of Git, 2.26, which will support national charsets. It is expected to be released in Q3 2020.

    Regards,
    Vladimir



  • 6.  RE: Git - fatal, incomplete multibyte sequence encountered

    Posted 05-26-2020 01:53

    Hallo Vlad,

    thanks a lot for the fast reply and good news. We are looking forward to extended charset support. It will solve a lot of problems and make work more smooth.

    Regards,
    Jörg



  • 7.  RE: Git - fatal, incomplete multibyte sequence encountered

    Posted 07-21-2020 11:30

    Any ETA on the update since we are now in Q3?

    Thanks