Problem with UTF-8 filename in GIT

237 views
Skip to first unread message

Webmaster 33

unread,
Feb 23, 2017, 5:37:54 AM2/23/17
to git-for-windows
Using Git v2.11.1 under Windows 7.

From time to time I notice problems with UTF-8 encoded filenames.
It happens with filenames, which has special accented characters, like:
ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem

Here is the last message I got when doing a rebase:
"C:\winprg\Git\bin\git.exe" rebase --continue
ssl
/certs/AC_Raíz_Certicámara_S.A..pem: needs update
ssl
/certs/Certinomis_-_Autorité_Racine.pem: needs update
ssl
/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem: needs update
ssl
/certs/NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem: needs update
ssl
/certs/TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.pem: needs update
ssl
/certs/TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5.pem: needs update
ssl
/certs/TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H6.pem: needs update
You must edit all merge conflicts and then
mark them
as resolved using git add
Done

Press Enter or Esc to close console...

Any idea how to fix this?
Is UTF-8 filename handling buggy in Git?

Thanks,
Webmaster33

Webmaster 33

unread,
Feb 23, 2017, 7:46:00 AM2/23/17
to git-for-windows

Also see these UTF-8 problems:
user@PC MINGW64 /w/Dev/!GIT/etckeeper (live_master|REBASE-i 21/32)
$ git status
interactive rebase
in progress; onto 2e7e791
Last commands done (21 commands done):
   pick dba4623 fixup
! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Create bash script to clone Moo
   pick
3e96a97 Fix SSL certification files UTF-8 filename problems
 
(see more in file .git/rebase-merge/done)
Next commands to do (11 remaining commands):
   pick
2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
   pick
5081303 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Create bash script to cl
 
(use "git rebase --edit-todo" to view and edit)
You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
 
(use "git commit --amend" to amend the current commit)
 
(use "git rebase --continue" once you are satisfied with your changes)

Changes not staged for commit:
 
(use "git add/rm <file>..." to update what will be committed)
 
(use "git checkout -- <file>..." to discard changes in working directory)

        deleted
:    "ssl/certs/AC_Ra\303\255z_Certic\303\241mara_S.A..pem"
        deleted
:    "ssl/certs/Certinomis_-_Autorit\303\251_Racine.pem"
        deleted
:    "ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa\304\237lay\304\261c\304\261s\304\261.pem"
        deleted
:    "ssl/certs/NetLock_Arany_=Class_Gold=_F\305\221tan\303\272s\303\255tv\303\241ny.pem"
        deleted
:    "ssl/certs/T\303\234B\304\260TAK_UEKAE_K\303\266k_Sertifika_Hizmet_Sa\304\237lay\304\261c\304\261s\304\2
        deleted:    "
ssl/certs/T\303\234RKTRUST_Elektronik_Sertifika_Hizmet_Sa\304\237lay\304\261c\304\261s\304\261_H5.pem"
        deleted:    "
ssl/certs/T\303\234RKTRUST_Elektronik_Sertifika_Hizmet_Sa\304\237lay\304\261c\304\261s\304\261_H6.pem"

Untracked files:
  (use "
git add <file>..." to include in what will be committed)

        "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"

no changes added to commit (use "
git add" and/or "git commit -a")


I think GIT has a bug handling UTF-8 filenames.

Webmaster 33

unread,
Feb 24, 2017, 6:26:58 AM2/24/17
to git-for-windows
Further strange issue with the UTF-8 filenames.
Doing an interactive rebase, which halts with errors, and when trying to solve the issue, I get into a loop when continuing the rebase.

Let me show you some interesting steps:
-----------------------------------------------------------------
")
-----------------------------------------------------------------
"
C:\winprg\Git\bin\git.exe" rebase --continue
[detached HEAD b0bc4a9] Fix SSL certification files UTF-8 filename problems
 3 files changed, 3 deletions(-)
 delete mode 120000 "
ssl/certs/AC_Ra\303\255z_Certic\303\241mara_S.A..pem"
 delete mode 120000 "
ssl/certs/Certinomis_-_Autorit\303\251_Racine.pem"
 delete mode 120000 "
ssl/certs/NetLock_Arany_=Class_Gold=_F\305\221tan\303\272s\303\255tv\303\241ny.pem"
error: unable to create file ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa glay ic is i.pem: Invalid argument
error: unable to create file ssl/certs/T9aB ITAK_UEKAE_K94k_Sertifika_Hizmet_Sa glay ic is i_-_S81r81m_3.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H5.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H6.pem: Invalid argument
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems

Done

Press Enter or Esc to close console...
-----------------------------------------------------------------
"
C:\winprg\Git\bin\git.exe" rebase --continue
error: The following untracked working tree files would be overwritten by merge:
        ssl/certs/AC_Ra!z_Certic mara_S.A..pem
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        ssl/certs/NetLock_Arany_=Class_Gold=_F8btanLs!tv ny.pem Please move or remove them before you merge.
Aborting
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems

Done

Press Enter or Esc to close console...
-----------------------------------------------------------------
user@PC MINGW64 /w/Dev/!GIT/etckeeper (live_master|REBASE-i 31/33)

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (33 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)

Untracked files:
  (use "
git add <file>..." to include in what will be committed)

        "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"

nothing added to commit but untracked files present (use "
git add" to track)

-----------------------------------------------------------------
deleted files:
        "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"
-----------------------------------------------------------------

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (33 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)

nothing to commit, working tree clean
-----------------------------------------------------------------
"
C:\winprg\Git\bin\git.exe" rebase --continue
error: unable to create file ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa glay ic is i.pem: Invalid argument
error: unable to create file ssl/certs/T9aB ITAK_UEKAE_K94k_Sertifika_Hizmet_Sa glay ic is i_-_S81r81m_3.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H5.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H6.pem: Invalid argument
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems

Done

Press Enter or Esc to close console...
-----------------------------------------------------------------

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (34 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)

Untracked files:
  (use "
git add <file>..." to include in what will be committed)

        "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"

nothing added to commit but untracked files present (use "
git add" to track)

-----------------------------------------------------------------
deleted files:
        "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"
-----------------------------------------------------------------

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (34 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)

nothing to commit, working tree clean
-----------------------------------------------------------------
"
C:\winprg\Git\bin\git.exe" rebase --continue
error: unable to create file ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa glay ic is i.pem: Invalid argument
error: unable to create file ssl/certs/T9aB ITAK_UEKAE_K94k_Sertifika_Hizmet_Sa glay ic is i_-_S81r81m_3.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H5.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H6.pem: Invalid argument
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems

Done

Press Enter or Esc to close console...
-----------------------------------------------------------------

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (35 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)

Untracked files:
  (use "
git add <file>..." to include in what will be committed)

        "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"

nothing added to commit but untracked files present (use "
git add" to track)
-----------------------------------------------------------------
git add .
-----------------------------------------------------------------

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (35 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)

Changes to be committed:
  (use "
git reset HEAD <file>..." to unstage)

        new file:   "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        new file:   ssl/certs/Certinomis_-_Autorit82_Racine.pem
        new file:   "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"

-----------------------------------------------------------------
$ git rebase --continue
[detached HEAD e864e5d] Fix SSL certification files UTF-8 filename problems
 3 files changed, 3 insertions(+)
 create mode 100644 "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
 create mode 100644 ssl/certs/Certinomis_-_Autorit82_Racine.pem
 create mode 100644 "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"
error: The following untracked working tree files would be overwritten by merge:
        ssl/certs/AC_Raíz_Certicámara_S.A..pem
        ssl/certs/Certinomis_-_Autorité_Racine.pem
        ssl/certs/NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Please move or remove them before you merge.
Aborting
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems

-----------------------------------------------------------------
deleted files:
        "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"
-----------------------------------------------------------------

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (36 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)


Changes not staged for commit:
  (use "
git add/rm <file>..." to update what will be committed)
  (use "
git checkout -- <file>..." to discard changes in working directory)

        deleted:    "
ssl/certs/AC_Ra\302\241z_Certic\302\240mara_S.A..pem"
        deleted:    ssl/certs/Certinomis_-_Autorit82_Racine.pem
        deleted:    "
ssl/certs/NetLock_Arany_=Class_Gold=_F8btan\302\243s\302\241tv\302\240ny.pem"


no changes added to commit (use "
git add" and/or "git commit -a")
-----------------------------------------------------------------
$ git checkout -- *
-----------------------------------------------------------------

$ git status
interactive rebase in progress; onto 2e7e791
Last commands done (36 commands done):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
  (see more in file .git/rebase-merge/done)
Next commands to do (3 remaining commands):

   pick 3e96a97 Fix SSL certification files UTF-8 filename problems
   pick 2f3dd41 Fix SSL certification files UTF-8 filename problems. Deleted files with UTF-8 problems.
  (use "git rebase --edit-todo" to view and edit)

You are currently editing a commit while rebasing branch 'live_master' on '2e7e791'.
  (use "
git commit --amend" to amend the current commit)
  (use "
git rebase --continue" once you are satisfied with your changes)

nothing to commit, working tree clean
-----------------------------------------------------------------
$ git rebase --continue
error: The following untracked working tree files would be overwritten by merge:
        ssl/certs/AC_Raíz_Certicámara_S.A..pem
        ssl/certs/Certinomis_-_Autorité_Racine.pem
        ssl/certs/NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Please move or remove them before you merge.
Aborting
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems

-----------------------------------------------------------------



I can not get out of this INFINITE LOOP, which  is caused by the UTF-8 filename encode handling BUG of Git.
I think this may affect only the Git for Windows version.

Could be possible to fix it?




On Thursday, February 23, 2017 at 11:37:54 AM UTC+1, Webmaster 33 wrote:

Webmaster 33

unread,
Feb 24, 2017, 6:38:39 AM2/24/17
to git-for-windows
Reposting the message, as it seems to be truncated by code quoting.
"C:\winprg\Git\bin\git.exe" rebase --continue
[detached HEAD b0bc4a9] Fix SSL certification files UTF-8 filename problems
 3 files changed, 3 deletions(-)
 delete mode 120000 "ssl/certs/AC_Ra\303\255z_Certic\303\241mara_S.A..pem"
 delete mode 120000 "ssl/certs/Certinomis_-_Autorit\303\251_Racine.pem"
 delete mode 120000 "ssl/certs/NetLock_Arany_=Class_Gold=_F\305\221tan\303\272s\303\255tv\303\241ny.pem"
error: unable to create file ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa glay ic is i.pem: Invalid argument
error: unable to create file ssl/certs/T9aB ITAK_UEKAE_K94k_Sertifika_Hizmet_Sa glay ic is i_-_S81r81m_3.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H5.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H6.pem: Invalid argument
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems
Done

Press Enter or Esc to close console...
-----------------------------------------------------------------

"C:\winprg\Git\bin\git.exe" rebase --continue
error: The following untracked working tree files would be overwritten by merge:
        ssl/certs/AC_Ra!z_Certic mara_S.A..pem
        ssl/certs/Certinomis_-_Autorit82_Racine.pem
        ssl/certs/NetLock_Arany_=Class_Gold=_F8btanLs!tv ny.pem Please move or remove them before you merge.
Aborting
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems
Done

Press Enter or Esc to close console...
"C:\winprg\Git\bin\git.exe" rebase --continue
error: unable to create file ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa glay ic is i.pem: Invalid argument
error: unable to create file ssl/certs/T9aB ITAK_UEKAE_K94k_Sertifika_Hizmet_Sa glay ic is i_-_S81r81m_3.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H5.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H6.pem: Invalid argument
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems
Done

Press Enter or Esc to close console...
"C:\winprg\Git\bin\git.exe" rebase --continue
error: unable to create file ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa glay ic is i.pem: Invalid argument
error: unable to create file ssl/certs/T9aB ITAK_UEKAE_K94k_Sertifika_Hizmet_Sa glay ic is i_-_S81r81m_3.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H5.pem: Invalid argument
error: unable to create file ssl/certs/T9aRKTRUST_Elektronik_Sertifika_Hizmet_Sa glay ic is i_H6.pem: Invalid argument
Could not apply 3e96a97... Fix SSL certification files UTF-8 filename problems
Done

Press Enter or Esc to close console...
Reply all
Reply to author
Forward
0 new messages