}
if ( $iconv_to != "UTF-8" ) {
- $decodedStr = iconv( "UTF-8", $iconv_to, $decodedStr );
+ $decodedStr = iconv( "utf-8", $iconv_to, $decodedStr );
}
return $decodedStr;
# Assume will only ever use utf-8 and iso-8859-1.
# This will *not* work in all circumstances.
function iconv( $from, $to, $string ) {
+ if ( substr( $to, -8 ) == '//IGNORE' ) $to = substr( $to, 0, strlen( $to ) - 8 );
if(strcasecmp( $from, $to ) == 0) return $string;
if(strcasecmp( $from, 'utf-8' ) == 0) return utf8_decode( $string );
if(strcasecmp( $to, 'utf-8' ) == 0) return utf8_encode( $string );
*/
function wfErrorLog( $text, $file ) {
if ( substr( $file, 0, 4 ) == 'udp:' ) {
+ # Needs the sockets extension
if ( preg_match( '!^(tcp|udp):(?://)?\[([0-9a-fA-F:]+)\]:(\d+)(?:/(.*))?$!', $file, $m ) ) {
// IPv6 bracketed host
$protocol = $m[1];