lib/PHPWord/PHPWord/Shared/String.php
public static function ConvertEncoding($value, $to, $from)
	{
		if (self::getIsMbstringEnabled()) {
			$value = mb_convert_encoding($value, $to, $from);
			return $value;
		}

		if (self::getIsIconvEnabled()) {
			$value = iconv($from, $to, $value);
			return $value;
		}

		// else, no conversion
		return $value;
	}
public static function ConvertEncoding($value, $to, $from)
	{
		if (self::getIsMbstringEnabled()) {
			$value = mb_convert_encoding($value, $to, $from);
			return $value;
		}

		if (self::getIsIconvEnabled()) {
			$value = iconv($from, $to, $value);
			return $value;
		}

		// else, no conversion
		return $value;
	}
public static function ConvertEncoding ( $ value , $ to , $ from ) { if ( self :: getIsMbstringEnabled ( ) ) { $ value = mb_convert_encoding ( $ value , $ to , $ from ) ; return $ value ; } if ( self :: getIsIconvEnabled ( ) ) { $ value = iconv ( $ from , $ to , $ value ) ; return $ value ; } // else, no conversion return $ value ; }
Convert string from one encoding to another. First try mbstring, then iconv, or no convertion

@param string $value
@param string $to Encoding to convert to, e.g. 'UTF-8'
@param string $from Encoding to convert from, e.g. 'UTF-16LE'
@return string
Convert string from one encoding to another . First try mbstring then iconv or no convertion