Ne-Lexa / php-zip

PhpZip is a php-library for extended work with ZIP-archives.
MIT License
491 stars 60 forks source link

php-zip does not support unicode folder names #52

Closed praine closed 4 years ago

praine commented 4 years ago

Description
I'm trying to use $zipFile->addEmptyDir() with Japanese text and the text does not appear in the directory name

How to reproduce
$zipFile->addEmptyDir('こんにちは')

Ne-Lexa commented 4 years ago

Hello. I did not find a problem with this. Give more context.

<?php

declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

$zipFile = new \PhpZip\ZipFile();
$zipFile->addEmptyDir('こんにちは');
$zipFile->saveAsFile(__DIR__ . '/test.zip');
$zipFile->close();

Result: test.zip Screenshot Screenshot2