[Rt-devel] [BUG] OriginalContent can return string with utf8 flag on

Ruslan U. Zakirov Ruslan.Zakirov at acronis.com
Tue Oct 12 04:18:26 EDT 2004


	Hello.
sub Attachment::OriginalContent {
...
   if (!$enc || $enc eq '' ||  $enc eq 'utf8' || $enc eq 'utf-8') {
     # If we somehow fail to do the decode, at least push out the raw bits
     eval {return( Encode::decode_utf8($content))} || return ($content);
   }
...
}

decode_utf8 returns string instead of octets.

perldoc Encode:
  $string = decode_utf8($octets [, CHECK]);


					Best regards. Ruslan.


More information about the Rt-devel mailing list