Currently, cygwin allows to use some special characters such as ':', '<', '>', '|', '"', '?' and '*'in file name. Therefore, replacing them with '_' in unzip is not necessary anymore.
--- origsrc/unzip60/unix/unix.c 2022-06-16 23:53:07.294144300 +0900
+++ src/unzip60/unix/unix.c 2022-06-17 00:01:05.388706800 +0900
@@ -578,14 +578,7 @@ int mapname(__G__ renamed)
break;
#ifdef __CYGWIN__ /* Cygwin runs on Win32, apply FAT/NTFS filename rules */
- case ':': /* drive spec not stored, so no colon allowed */
case '\\': /* '\\' may come as normal filename char (not */
- case '<': /* dir sep char!) from unix-like file system */
- case '>': /* no redirection symbols allowed either */
- case '|': /* no pipe signs allowed */
- case '"': /* no double quotes allowed */
- case '?': /* no wildcards allowed */
- case '*':
*pp++ = '_'; /* these rules apply equally to FAT and NTFS */
break;
#endif
Sorry, the comment is broken with above patch...
How do you want to create such files in windows?
Cygwin replaces these chars with unicode chars of
0xf000 | ch
. Therefore, cygwin can treat these chars as a part of filename. Of course, they cannot be displayed properly outside cygwin.