@@ -90,29 +90,9 @@ function remove_data($id, $dir = NULL)
9090 }
9191}
9292
93- function create_data ($ id , $ item = "" , $ cp = 65001 , $ utf8 = true )
93+ /* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */
94+ include __DIR__ . DIRECTORY_SEPARATOR . "util_utf8.inc " ;
95+ function create_data ($ id , $ item = "" , $ cp = 65001 )
9496{
95- if ($ utf8 ) {
96- /* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */
97- include dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "util_utf8.inc " ;
98- return create_data_from_utf8 ($ id , $ item , $ cp );
99- } else {
100-
101- $ prefix = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . $ id ;
102-
103- if (!is_dir ($ prefix )) {
104- mkdir ($ prefix );
105- }
106-
107- if (str_starts_with ($ id , "dir " )) {
108- create_verify_dir ($ prefix , $ item , $ cp );
109- } else if (str_starts_with ($ id , "file " )) {
110- /* a bit unhandy, but content can be put from outside, if needed */
111- create_verify_file ($ prefix , $ item , "dummy content " , $ cp );
112- } else {
113- echo "Item has either to start with \"dir \" or \"file \"" ;
114- }
115- }
116-
117- return $ prefix ;
97+ return create_data_from_utf8 ($ id , $ item , $ cp );
11898}
0 commit comments