Author Topic: wrong letters in email  (Read 2048 times)

greyow

  • Beginner
  • *
  • Posts: 7
wrong letters in email
« on: April 04, 2008, 02:18:07 am »
Description:
I use hungarian language. There are two characters which not encode the utf8_encode function. utf8_encode translate only ISO-8859-1 characters, so I have ? characters in email.

classes/ps_main.php:583: $mail->Body = vmAbstractLanguage::safe_utf8_encode( $mail->Body, $mail->CharSet );
-> classes/language.class.php 153:  $text = utf8_encode(utf8_decode($text));

Steps to replicate:
<?php
$test_s = "öő";
$deco_s = utf8_decode($test_s);
$enco_s = utf8_encode($deco_s);
echo "start: $test_s decode: $deco_s encode: $enco_s \n";
?>

result:
start: öő decode: �? encode: ö?


Proposed fix(es):
Don't use utf8_[de/en]code please.


VirtueMart Version: VirtueMart_1.1.0_1332
Joomla Version: 1.5.2
System info:
MySQL: 5.0.45-Debian_1-log
PHP:  4.4.4-9+lenny1
Apache/1.3.34 (Debian) PHP/4.4.4-9+lenny1 mod_fastcgi/2.4.2
Mozilla/5.0 (X11; U; Linux i686; hu; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13