guberm / tortoisegit

Automatically exported from code.google.com/p/tortoisegit
0 stars 0 forks source link

Filenames get corrupted when exporting Japanese filenames to zip #1328

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a file with a Japanese file name 
   eg "新しいテキスト ドキュメント.txt"
2. Commit the file
3. Export the version as a zip file (TortoiseGIT -> Export)

What is the expected output? What do you see instead?
The zip file should contain "新しいテキスト ドキュメント.txt", 
but instead it contains 
"譁ー縺励>繝・く繧ケ繝・繝峨く繝・繝。繝ウ繝・txt"

What version of TortoiseGit and msysgit are you using? On
what operating system?
TortoiseGit 1.7.12.0 
git version 1.7.11.msysgit.1 (C:\Program Files (x86)\Git\bin) 
Windows 7 (Microsoft Windows [Version 6.1.7601]) Japanese x64

Please provide any additional information below.
Using "Save revision to" does not cause this problem.
Contents of the file is intact, just that the filename is corrupted.

Original issue reported on code.google.com by eijikum...@gmail.com on 10 Aug 2012 at 5:37

GoogleCodeExporter commented 9 years ago
This is a git/msysgit issue. TortoiseGit just calls "git.exe archive 
--output=filename.zip --format=zip --verbose REVISION".

Reported upstream: http://marc.info/?l=git&m=134463730101153&w=2

Original comment by sstrickr...@googlemail.com on 10 Aug 2012 at 10:21

GoogleCodeExporter commented 9 years ago
I see the upstream thread - but not on the mailing list so I'm posting this 
here:
re-encoding to latin1 may break double byte totally. 

PKZIP APPNOTE seems to be the zip standard and it specifies a utf-8 flag:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT
> A.  Local file header:
> general purpose bit flag: (2 bytes)
> Bit 11: Language encoding flag (EFS).  If this bit is
> set, the filename and comment fields for this file
> must be encoded using UTF-8. (see APPENDIX D)

Original comment by eijikum...@gmail.com on 10 Aug 2012 at 11:49

GoogleCodeExporter commented 9 years ago
Issue 1409 has been merged into this issue.

Original comment by sstrickr...@googlemail.com on 23 Sep 2012 at 5:28