Bad CHARSET in filenames of zip archives, created with ubuntu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
p7zip (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
zip (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I try to create a zip archive on Ubuntu (using Ubuntu 9.04 AMD64) with non-latin symbols in filename that opens correctly on Windows XP but can't do it.
All non-latin (Russian) symbols shows in Windows XP (I try standart support of ZIP in WinXP and 7zip on windows) bad.
For example, I create the file named "тестовый_файл.txt" and try to pack via standart zip and 7z:
$ 7z a ./test_linux_7z.zip ./тестовый_файл.txt
$ zip -r ./test_
And I try to create the archive on Windows XP via internal zip (test_win_
After that I can correctly view the filename in all files in Linux:
$ unzip -l ./test_
4 07-07-09 18:49 тестовый_файл.txt
$ unzip -l ./test_linux_7z.zip
4 07-07-09 18:49 тестовый_файл.txt
$ unzip -l ./test_
4 07-07-09 18:49 тестовый_файл.txt
$ unzip -l ./test_win_7z.zip
4 07-07-09 18:49 тестовый_файл.txt
But on WINDOWS I try to list filenames in archives that created on linux, but it shows bad:
E:\murz\
7-Zip 4.57 Copyright (c) 1999-2007 Igor Pavlov 2007-12-06
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ -------
2009-07-07 18:49:14 ..... 4 4 С'РчС_С'
------------------- ----- ------------ ------------ -------
E:\murz\
2009-07-07 18:49:14 ..... 4 4 С'РчС_С'
E:\murz\
2009-07-07 18:49:14 ..... 4 4 тестовый_файл.txt
E:\murz\
2009-07-07 18:49:14 ....A 4 4 тестовый_файл.txt
And if I try to list via Windows internal zip, I see bad filename too (results are on attached screenshot).
I have attached to bug all created files for testing.
How I can correctly create a zip archive on Ubuntu that normally extracts on windows?
I searched that for correct filenames in zip on Windows it must be stored in DOS (CP866) encoding. But I can't find how to force zip command create filenames in DOS encoding.
Command unzip have an options for working with DOS encoding:
$ unzip --help
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives
-I CHARSET specify a character encoding for UNIX and other archives
But zip didn't work with this options:
$ zip -O DOS -r ./test2.zip ./тестовый_файл.txt
zip error: Invalid command arguments (no such option: O)