I'm trying to build zip achives with unicode filenames that are portable across machines. The default options for filenames in zip archives only uses UTF8 for characters that are outside the current code page. This causes problems when moving archives between machine with different code pages. For example I get the following results for a set of files with hebrew characters:
Zip Unzip
en_GB en_GB OK
en_GB he_IL OK
he_IL he_IL OK
he_IL en_GB BAD
en_GB se_SV OK
(Code page en_GB = 850, he_IL = 862)
Acccording to the documentation, I need to use the -mcu=on switch. EG:
7z.exe a Hebrew.zip "Fast Talker" -mcu=on
to get UTF-8 encoding on non-ascii characters in file names.
Is it possible to make this the default when creating archives using the GUI?
Windows XP SP3.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks
I was rather hoping for a way to make this the default for zip files. I frequently work with unicode and change locales on my machine frequently.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the current version of the offline help for 7-zip, there are only three pages for the word "unicode". The first is the description of the 7z format, the second is "-scc (Set charset for console input/output) switch", the third is "-scs (Set charset for list files) switch". Has the syntax changed, or is the user manual incomplete?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Добрый день.
Все же нельзя сделать отдельную настройку, чтобы zip-архив всегда создавался с использованием utf-8? Некорректно работает архиватор при таком алгоритме (и не только при таком, думаю):
1) Создаю архив в FM (опция cu включена), файлы из английских букв.
2) Открываю архив в FM, добавляю файл с русскими буквами.
3) Проверяю (на андроиде) - имя файла с русскими буквами заменено на кракозябры. (
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
7-zip uses utf-8 in zip by default with another way: extra field up.
That way provides better compatibility with old programs.
What exact app in android doesn't support such zips?
Did you try another programs in Android?
Last edit: Igor Pavlov 2024-04-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I'm trying to build zip achives with unicode filenames that are portable across machines. The default options for filenames in zip archives only uses UTF8 for characters that are outside the current code page. This causes problems when moving archives between machine with different code pages. For example I get the following results for a set of files with hebrew characters:
(Code page en_GB = 850, he_IL = 862)
Acccording to the documentation, I need to use the -mcu=on switch. EG:
7z.exe a Hebrew.zip "Fast Talker" -mcu=on
to get UTF-8 encoding on non-ascii characters in file names.
Is it possible to make this the default when creating archives using the GUI?
Windows XP SP3.
Write in Parameters:
cu
But it will work only for "Add to Archive …" command (the command with dialog box).
Thanks
I was rather hoping for a way to make this the default for zip files. I frequently work with unicode and change locales on my machine frequently.
What is the command line parameter that corresponds to "cu" in the Parameters, as mentioned above? I could not find it.
Sorry, I did find it, in the original bug report. -m didn't sound like the option for file names.. but it is :)
7z.exe sends -m switches to archive handlers: ZIP, RAR, 7z.
-s switches are processed by main code (7z.exe, 7zG.exe).
7-Zip GUI sends all options from "Parameters" box to archive handlers. So it doesn't use -m prefix.
-mcu
-m send to archive handler
cu (Codepage Unicode).
Last edit: Igor Pavlov 2015-02-01
In the current version of the offline help for 7-zip, there are only three pages for the word "unicode". The first is the description of the 7z format, the second is "-scc (Set charset for console input/output) switch", the third is "-scs (Set charset for list files) switch". Has the syntax changed, or is the user manual incomplete?
7-zip uses unicode when it's useful. So no need to describe it in help.
It works by default.
Добрый день.
Все же нельзя сделать отдельную настройку, чтобы zip-архив всегда создавался с использованием utf-8? Некорректно работает архиватор при таком алгоритме (и не только при таком, думаю):
1) Создаю архив в FM (опция cu включена), файлы из английских букв.
2) Открываю архив в FM, добавляю файл с русскими буквами.
3) Проверяю (на андроиде) - имя файла с русскими буквами заменено на кракозябры. (
7-zip uses utf-8 in zip by default with another way: extra field
up
.That way provides better compatibility with old programs.
What exact app in android doesn't support such zips?
Did you try another programs in Android?
Last edit: Igor Pavlov 2024-04-18