It is not a secret that all osCommerce/swisscart® have ISO-8859-1 encoding which works OK until you start to edit German language-files with UTF-8 IDE. Of course the quick and easy solution is to replace all spacial characters (umlauts and scharfes s) with corresponding HTML codes which will again work fine unless there’s an email text in the file and `EMAIL_USE_HTML` constant is set to `false`. In this case user will get all HTML codes as they are not translated into correspondent visual symbols.

Fortunately there’s a workaround. The following code have to be added inside of the tep_mail function (includes/functions/general.php, admin/includes/functions/general.php).

After this line:

$text = strip_tags($email_text);

Add:

$german_html = array('Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', 'ß');
$german_display = array('Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', 'ß');
$text = $string = str_replace($german_html, $german_display, htmlspecialchars_decode($text));

You don’t have to worry that you input the content of $german_display array with your UTF-8 IDE because in anyways it will be sent by mail so no HTML meta tags will apply.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.