[TYPO3-german] Tipafriend E-Mail YOURNAME falsche Sonderzeichen (gelöst)

Bernd Hückstädt akademie at joytopia.net
Wed Feb 3 19:05:26 CET 2010


Am 03.02.2010 um 18:51 schrieb Peter Russ:

>> 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
>
> Dann würde ich mal versuchen, dass durch entsprechende Einstellungen  
> in php.ini zu fixen. Welche PHP Version auf welchen OS läuft denn?


Hallo Peter,

Es ist Linux, php 5.2.11 und Typo3 4.3.1
Mittwald Agenturpaket 5.0

Welche "entsprechenden Einstellungen in php.ini" meinst Du?

Ich hatte gelesen, dass php grundsätzlich Probleme mit preg_replace  
und utf8 hätte. Stimmt das nicht?

Viele Grüße
Bernd



More information about the TYPO3-german mailing list