[TYPO3-german] Tipafriend E-Mail YOURNAME falsche Sonderzeichen (gelöst)
    Bernd Hückstädt 
    akademie at joytopia.net
       
    Wed Feb  3 15:23:04 CET 2010
    
    
  
Am 02.02.2010 um 19:28 schrieb Bernd Hückstädt:
> bei der E-Mail von Tipafriend werden beim Absendernamen die  
> Sonderzeichen falsch dargestellt
Hallo,
ich habe es lösen können:
Das Problem liegt bei php in der Funktion preg_replace, die nicht mit  
utf8 und Sonderzeichen umgehen kann.
Die schnelle Lösung: utf8_decode und hinterher utf8_encode
Datei: /tipafriend/pi/class.tx_tipafriend.php
Zeile 254, function validate:
$pattern = '/[^\d\s\w]/';	// search for characters that don't belong  
to one of the classes decimal, whitespace or word
$tipData['name'] = utf8_decode($tipData['name']) ; // fuer  
preg_replace vorbereiten
$tipData['name'] = trim( preg_replace( $pattern, '',  
$tipData['name'] ) );	// strip the mentioned characters
$tipData['name'] = utf8_encode($tipData['name']); // in utf8  
rueckverwandeln
Viele Grüße
Bernd
    
    
More information about the TYPO3-german
mailing list