Since I can not access to dev.virtuemart.net, so I post here
My language charset is utf-8 and in the function safe_utf8_encode (which used in vmMail):
if( strtolower($charset) == 'utf-8') {
// safely decode and reencode the string
$text = utf8_encode(utf8_decode($text));
}
it damages the email subject.
example: "Sản phẩm được yêu cầu"
will be "S?n ph?m ???c yêu c?u"
Developers, please have a look.
Regards
--
Replika
Could you please try this modification of the safe_utf8_encode function ?
if( strtolower($charset) == 'utf-8' && !seems_utf8( $text )) {
// safely decode and reencode the string
$text = utf8_encode($text);
}
Does this work?
hi soeren
where goes this code? Does it solve the problem with PDF creation also?
@Soeren
After checking, the code should be: ;)
if( strtolower($charset) == 'utf-8' && !vmAbstractLanguage::seems_utf8($text) ) {
// safely decode and reencode the string
$text = utf8_encode(utf8_decode($text));
}
edit:
I've had problem with utf8 in PDF also. Posted the feature request that using PDF creation in Joomla lib: http://dev.virtuemart.net/cb/issue/1584?navigation=true
hi replika,
this code provided actaly works? where do you place it?
Quote from: korb on April 25, 2008, 01:06:55 AM
hi replika,
this code provided actaly works? where do you place it?
File: administrator/com_virtuemart/classes/language.class.php
Line: 150
But it's not for PDF issue
Hi Soeren,
I think this encode is not needed.
For the most accentuated languages the ISO-8859-1 is not enough,
so the language file isn't possible to be written in ISO-8859-1.
The utf8_encode of php encodes an ISO-8859-1 string to UTF-8.
Interpreters know in what way to save the file, I think you should delete this part.
You can try it. (http://forum.virtuemart.net/index.php?topic=38247.0)