ID: 14499 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: XSLT related Operating System: windows 2000 PHP Version: 4.1.0 New Comment:
i run into the same problem with the php-4.1.1/2 windows binaries. i tried to solve the problem by getting the latest sablotron binaries for windows (http://www.gingerall.com/charlie/ga/xml/d_sab.xml) - which do include encoding support - but still got the "xslt_set_encoding() is not supported in this PHP build". a look into the sources revealed the problem: ext\xslt\sablot.c #ifdef HAVE_SABLOT_SET_ENCODING PHP_FE(xslt_set_encoding, NULL) #else PHP_FALIAS(xslt_set_encoding, warn_not_available, NULL) #endif etc. so i recompiled php_xslt with #define HAVE_SABLOT_SET_ENCODING - and voila - it works perfectly! (fyi: the dll is available from http://kollm.org/php_xslt/php_xslt.dll) as windows user typically dont compile php - they get the windows binaries and expect them to work ;) - i would recommend to include the appropriate changes (sablotron dll's with encoding support; HAVE_SABLOT_SET_ENCODING defined) into the next binary release. this error is really frustrating for windows users because most of them dont have the possibility to recompile php. thanks! Previous Comments: ------------------------------------------------------------------------ [2001-12-14 11:59:35] [EMAIL PROTECTED] In order to use utf-8 you must set the encoding from within your <?xml ?> block.. If you want to use the xslt_set_encoding() function than you must compile sablotron itself with encoding support. not a bug. ------------------------------------------------------------------------ [2001-12-13 17:52:07] [EMAIL PROTECTED] I got this error using XSLT in PHP-4.1.0 on Windows 2000. Warning: Sablotron error on line 1: unknown encoding '' in e:\www\htdocs\home.php on line 151 Warning: Unknown persistent list entry type in module shutdown (11) in Unknown on line 0 and when I add an encoding statement, Warning: xslt_set_encoding() is not supported in this PHP build in e:\www\htdocs\home.php on line 150 My code: $xml = $doc->dumpmem(); $arguments = array( '/_xml' => $xml, ); // Allocate a new XSLT processor $xh = xslt_create(); #xslt_set_encoding($xh, "utf-8"); // Process the document $result = xslt_process($xh, 'arg:/_xml', $include_dir . $xslt_filename, NULL, $arguments); var_dump($result); xslt_free($xh); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=14499&edit=1