1--TEST-- 2Thai cp874 basic test 3--SKIPIF-- 4<?php 5include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; 6 7skip_if_not_win(); 8if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); 9skip_if_no_required_exts(); 10skip_if_wrong_cp(874, "oem"); 11 12?> 13--INI-- 14default_charset=cp874 15--FILE-- 16<?php 17/* 18#vim: set fileencoding=cp874 19#vim: set encoding=cp874 20*/ 21 22include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; 23 24$names = array( /* cp874 */ 25 "�������跴�ͺ1", 26 "�������跴�ͺ2", 27 "�������跴�ͺ3", 28 "�������跴�ͺ4", 29 "�������跴�ͺ5", 30 "�������跴�ͺ6", 31 "�������跴�ͺ7", 32 "�������跴�ͺ8", 33 "�������跴�ͺ8 10", 34); 35 36$i = 0; 37foreach ($names as $name) { 38 $path = __DIR__ . DIRECTORY_SEPARATOR . $name . ".txt"; 39 40 file_put_contents($path, "hello" . $i++); 41 42 get_basename_with_cp($path, 874); 43 var_dump(file_get_contents($path)); 44 45 unlink($path); 46} 47 48?> 49===DONE=== 50--EXPECTF-- 51Active code page: %d 52getting basename of %s�������跴�ͺ1.txt 53string(%d) "�������跴�ͺ1.txt" 54bool(true) 55string(%d) "%s�������跴�ͺ1.txt" 56Active code page: %d 57string(6) "hello0" 58Active code page: %d 59getting basename of %s�������跴�ͺ2.txt 60string(%d) "�������跴�ͺ2.txt" 61bool(true) 62string(%d) "%s�������跴�ͺ2.txt" 63Active code page: %d 64string(6) "hello1" 65Active code page: %d 66getting basename of %s�������跴�ͺ3.txt 67string(%d) "�������跴�ͺ3.txt" 68bool(true) 69string(%d) "%s�������跴�ͺ3.txt" 70Active code page: %d 71string(6) "hello2" 72Active code page: %d 73getting basename of %s�������跴�ͺ4.txt 74string(%d) "�������跴�ͺ4.txt" 75bool(true) 76string(%d) "%s�������跴�ͺ4.txt" 77Active code page: %d 78string(6) "hello3" 79Active code page: %d 80getting basename of %s�������跴�ͺ5.txt 81string(%d) "�������跴�ͺ5.txt" 82bool(true) 83string(%d) "%s�������跴�ͺ5.txt" 84Active code page: %d 85string(6) "hello4" 86Active code page: %d 87getting basename of %s�������跴�ͺ6.txt 88string(%d) "�������跴�ͺ6.txt" 89bool(true) 90string(%d) "%s�������跴�ͺ6.txt" 91Active code page: %d 92string(6) "hello5" 93Active code page: %d 94getting basename of %s�������跴�ͺ7.txt 95string(%d) "�������跴�ͺ7.txt" 96bool(true) 97string(%d) "%s�������跴�ͺ7.txt" 98Active code page: %d 99string(6) "hello6" 100Active code page: %d 101getting basename of %s�������跴�ͺ8.txt 102string(%d) "�������跴�ͺ8.txt" 103bool(true) 104string(%d) "%s�������跴�ͺ8.txt" 105Active code page: %d 106string(6) "hello7" 107Active code page: %d 108getting basename of %s�������跴�ͺ8 10.txt 109string(%d) "�������跴�ͺ8 10.txt" 110bool(true) 111string(%d) "%s�������跴�ͺ8 10.txt" 112Active code page: %d 113string(6) "hello8" 114===DONE=== 115