Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

email_in.pl encoding problems

150 views
Skip to first unread message

dave.xd...@gmail.com

unread,
Jan 16, 2008, 11:20:56 AM1/16/08
to
Hi folks,

I've googled around on this problem and don't see any hits so I've
clearly missed something basic.

I have Bugzilla 3.0.3 installed on a CentOS system. I have all the
perl modules installed, including all the optional ones (the only one
that --check-modules says is missing is the Pg module because I'm
using MySQL).

I have set up email_in.pl with the .procmailrc forwarding method, and
incoming emails are sent to the script. The problem is that every
time the script answers with:

Unknown encoding '"us-ascii"'

...or:

Unknown encoding '"iso-8859-1"'

...depending on whether I have Outlook set to "HTML" or "Plain Text"
respectively.

I suspect the answer is "Outlook is broken, don't use it" but since my
user community has Outlook forced on them the gateway will be useless
if I can't get it working.

My procmail log for such a transaction is:

procmail: Couldn't determine implicit lockfile from "/var/www/bugzilla/
email_in.pl"
Parsing Email
Splitting Body and Attachments [Type: text/plain;
charset="iso-8859-1"]...
Part Content-Type: text/plain; charset="iso-8859-1"
Part Character Encoding: "iso-8859-1"
Unknown encoding '"iso-8859-1"' From Dave.Ma...@domain.com Wed
Jan 16 11:03:09 2008
Subject: [2]
Folder: /var/www/bugzilla/email_in.pl -
vvv 1764

Any pointers to resources on the web I can use to learn how to fix
this, or other advise, would be appreciated.

Thank you for your time!

Max Kanat-Alexander

unread,
Jan 16, 2008, 3:23:08 PM1/16/08
to support-...@lists.mozilla.org
On Wed, 16 Jan 2008 08:20:56 -0800 (PST) "dave.xd...@gmail.com"
<dave.xd...@gmail.com> wrote:
> Unknown encoding '"us-ascii"'
> ...or:
> Unknown encoding '"iso-8859-1"'

Hey Dave. That is really weird. I just tried this on my local
CentOS 4 machine:

perl -w -MEncode -e 'print encode("UTF-8", decode("iso-8859-1",
"test"));

(Which is essentially what Bugzilla is doing at that point) and
there was no trouble. I'm suspecting more of a problem with your Perl
installation somehow than anything else.

In any case, it looks like the script progresses beyond that
point, so if it's not adding bugs to the system, something else might
be wrong.

-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla and Perl Services. Everything Else, too.

Message has been deleted

bob.cry...@gmail.com

unread,
Feb 21, 2008, 5:42:04 PM2/21/08
to
On Jan 16, 1:23 pm, Max Kanat-Alexander <mka...@bugzilla.org> wrote:
> On Wed, 16 Jan 2008 08:20:56 -0800 (PST) "dave.xdroop....@gmail.com"

> > Unknown encoding '"us-ascii"'
> > ...or:
> > Unknown encoding '"iso-8859-1"'
>
> Hey Dave. That is really weird. I just tried this on my local
> CentOS 4 machine:
>
> perl -w -MEncode -e 'print encode("UTF-8", decode("iso-8859-1",
> "test"));

Any ideas on this? I'm also encountering the problem. In my case, it's
when I try to use Entourage as my mailer; it specifies US-ASCII as the
charset, and the e-mail script chokes:

procmail: Couldn't determine implicit lockfile from "/usr/local/
apache2/htdocs/bugzilla/email_in.pl"
Parsing Email
Splitting Body and Attachments [Type: text/plain; charset="US-
ASCII"]...
Part Content-Type: text/plain; charset="US-ASCII"
Part Character Encoding: "US-ASCII"
Unknown encoding '"US-ASCII"' From x...@yyy.com Thu Feb 21 16:22:41
2008
Subject: [Bug 4] YA test
Folder: /usr/local/apache2/htdocs/bugzilla/email_in.pl -vv 2809

When this happens, the comment does *not* get posted. If I send a
message from the command line "mail" command, it works fine. I'm
guessing the latter doesn't insert the charset blurb into the content-
type: header.

I ran your perl one-liner, and it did just fine. I also tried this
variation:

% perl -w -MEncode -e 'print encode("US-ASCII", decode("iso-8859-1",
"test"));'

Here are the relevant headers from my original, outgoing message to
Bugzilla:

Mime-version: 1.0
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

This is a pretty serious problem since all of my users are on either
Entourage or Outlook. (And I'd not be surprised if this problem was
shared with many other clients, as well.)

bob.cry...@gmail.com

unread,
Feb 21, 2008, 7:02:57 PM2/21/08
to
For the benefit of others who may be searching for a fix, see:

<https://bugzilla.mozilla.org/show_bug.cgi?id=413672>

and

<https://bugzilla.mozilla.org/show_bug.cgi?id=418930>

0 new messages