I can not set header_charset header item to ISO-8859-2 in GT::Mail.
It always uses ISO-8859-1.
I tried several solutions,
'header_charset' => 'ISO-8859-2'
);or
'header_charset' => 'ISO-8859-2'
);
but same result, header items are always encoded into ISO-8859-1.
Here is the whole code I use for testing:
use warnings;
use Data::Dumper;
use GT::Mail;
# Get a new mailer object
my $mailer = GT::Mail->new(
# 'header_charset' => 'ISO-8859-2'
);
#$mailer->args(
# 'header_charset' => 'ISO-8859-2'
#);
$mailer->set('header_charset', 'ISO-8859-2');
# Input a text email string, with full header
my $mail_txt = q|To: Hisname <info@hisdomain.com>
From: Myname <me@mydomain.com>
Errors-To: Hisname <info@hisdomain.com>
Subject: Test email subject - áíûõüöúóé
test email message body - áíûõüöúóé
|;
# Parse the string
$mailer->parse($mail_txt);
# Flatten mail object into string
my $mail_result = $mailer->as_string();
print '$mail_result: ' . Dumper(\$mail_result) . "";
Is this a bug, or I do something wrong?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
It always uses ISO-8859-1.
I tried several solutions,
Code:
my $mailer = GT::Mail->new( 'header_charset' => 'ISO-8859-2'
);
Code:
$mailer->args( 'header_charset' => 'ISO-8859-2'
);
but same result, header items are always encoded into ISO-8859-1.
Here is the whole code I use for testing:
Code:
use strict; use warnings;
use Data::Dumper;
use GT::Mail;
# Get a new mailer object
my $mailer = GT::Mail->new(
# 'header_charset' => 'ISO-8859-2'
);
#$mailer->args(
# 'header_charset' => 'ISO-8859-2'
#);
$mailer->set('header_charset', 'ISO-8859-2');
# Input a text email string, with full header
my $mail_txt = q|To: Hisname <info@hisdomain.com>
From: Myname <me@mydomain.com>
Errors-To: Hisname <info@hisdomain.com>
Subject: Test email subject - áíûõüöúóé
test email message body - áíûõüöúóé
|;
# Parse the string
$mailer->parse($mail_txt);
# Flatten mail object into string
my $mail_result = $mailer->as_string();
print '$mail_result: ' . Dumper(\$mail_result) . "";
Is this a bug, or I do something wrong?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...