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--EXPECTF-- 50Active code page: %d 51getting basename of %s�������跴�ͺ1.txt 52string(%d) "�������跴�ͺ1.txt" 53bool(true) 54string(%d) "%s�������跴�ͺ1.txt" 55Active code page: %d 56string(6) "hello0" 57Active code page: %d 58getting basename of %s�������跴�ͺ2.txt 59string(%d) "�������跴�ͺ2.txt" 60bool(true) 61string(%d) "%s�������跴�ͺ2.txt" 62Active code page: %d 63string(6) "hello1" 64Active code page: %d 65getting basename of %s�������跴�ͺ3.txt 66string(%d) "�������跴�ͺ3.txt" 67bool(true) 68string(%d) "%s�������跴�ͺ3.txt" 69Active code page: %d 70string(6) "hello2" 71Active code page: %d 72getting basename of %s�������跴�ͺ4.txt 73string(%d) "�������跴�ͺ4.txt" 74bool(true) 75string(%d) "%s�������跴�ͺ4.txt" 76Active code page: %d 77string(6) "hello3" 78Active code page: %d 79getting basename of %s�������跴�ͺ5.txt 80string(%d) "�������跴�ͺ5.txt" 81bool(true) 82string(%d) "%s�������跴�ͺ5.txt" 83Active code page: %d 84string(6) "hello4" 85Active code page: %d 86getting basename of %s�������跴�ͺ6.txt 87string(%d) "�������跴�ͺ6.txt" 88bool(true) 89string(%d) "%s�������跴�ͺ6.txt" 90Active code page: %d 91string(6) "hello5" 92Active code page: %d 93getting basename of %s�������跴�ͺ7.txt 94string(%d) "�������跴�ͺ7.txt" 95bool(true) 96string(%d) "%s�������跴�ͺ7.txt" 97Active code page: %d 98string(6) "hello6" 99Active code page: %d 100getting basename of %s�������跴�ͺ8.txt 101string(%d) "�������跴�ͺ8.txt" 102bool(true) 103string(%d) "%s�������跴�ͺ8.txt" 104Active code page: %d 105string(6) "hello7" 106Active code page: %d 107getting basename of %s�������跴�ͺ8 10.txt 108string(%d) "�������跴�ͺ8 10.txt" 109bool(true) 110string(%d) "%s�������跴�ͺ8 10.txt" 111Active code page: %d 112string(6) "hello8" 113