1--TEST--
2Bug #71509 Zip problem with swedish letters in filename.
3--SKIPIF--
4<?php
5include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc";
6
7skip_if_not_win();
8if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
9skip_if_no_required_exts("zip");
10
11?>
12--FILE--
13<?PHP
14// ���
15
16include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc";
17
18$item = iconv("ISO-8859-1", "UTF-8", "R�d_Statistics"); // cp1252
19$prefix = create_data("bug71509", "$item.txt");
20$testfile_zip = $prefix . DIRECTORY_SEPARATOR . "$item.txt";
21$outputfile_zip = $prefix . DIRECTORY_SEPARATOR . "$item.zip";
22
23var_dump(file_exists($testfile_zip));
24
25$zipfile = new ZipArchive;
26
27$return_code = $zipfile->open($outputfile_zip, ZipArchive::CREATE);
28if ($return_code != true) die("Failed to open file: " . $return_code);
29
30$return_code = $zipfile->addfile($testfile_zip, basename($testfile_zip));
31if ($return_code != true) print("Failed to add file: " . $zipfile->getStatusString());
32
33$return_code = $zipfile->close();
34if ($return_code != true) die("Failed to close archive: " . $zipfile->getStatusString());
35
36var_dump(file_exists($outputfile_zip));
37
38remove_data("bug71509");
39?>
40===DONE===
41--EXPECT--
42bool(true)
43bool(true)
44===DONE===
45