parsing - PHP: simplexlsx Parser specialchars
hope someone can help me out.
Im using simplexlsx ( http://www.phpclasses.org/package/6279-PHP-Parse-and-retrieve-data-from-Excel-XLS-files.html ) to read out my Excel files and display them/write them into my DB.
Now i have the problem that the class wont parse specialchars like : "Ä, Ü, Ö, ß..." correct i tryed to write a function to fix it, but it wont work.
Hope some of you guys could help me.
Thx so far xQp
// Try
function unhtmlspecialchars( $string ){
$string = str_replace ( '&', '&', $string );
$string = str_replace ( ''', '\'', $string );
$string = str_replace ( '"', '"', $string );
$string = str_replace ( '<', '<', $string );
$string = str_replace ( '>', '>', $string );
$string = str_replace ( 'ü', 'ü', $string );
$string = str_replace ( 'Ü', 'Ü', $string );
$string = str_replace ( 'ä', 'ä', $string );
$string = str_replace ( 'Ä', 'Ä', $string );
$string = str_replace ( 'ö', 'ö', $string );
$string = str_replace ( 'Ö', 'Ö', $string );
return $string;
}
tryed to get call that function within the simplexlsx.class before return the $value
// edit 2 my try was the to add the function unhtmlspecialchars to simplexlsx.class and call it at the end of the "function value()" before returning the value like this just to test it...
$value2 = $this->unhtmlspecialchars($value);
return $value2 ;
Answer
Solution:
The solution (as stated by the OP in the comments) is to use
to restore the special chars in the output.