Board index » delphi » Indy TidMessage.Subject decode question

Indy TidMessage.Subject decode question

Hello!

In some cases, message header may contain some language specific (germany,
estonian) characters. I'm not sure if you can read these chars out, but
still, some samples : ?, ?, , ?

In these cases Indy shows the header like this
=?windows-1257?Q?Palju_=Fnne_s=FCnnip=e4evaks. =?
( not important, but should be "Palju ?nne snnip?evaks" or simply in
english "Happy birthday")

My question is : is there a way to decode these encoded strings with Indy or
should a third party decoder be used?

I also surfed in newsgroups and found one similar problem, where Kudzu
indicates that these strings should be automatically decoded....but no
further solution is provided.

http://groups.google.com/groups?hl=et&lr=&ie=UTF-8&oe=UTF8&threadm=90...
chadngpbecom%40207.105.83.62&rnum=3&prev=/groups%3Fq%3Dmessage%2Bsubject%2Bd
ecode%2Bindy%2Bdelphi%26hl%3Det%26lr%3D%26ie%3DUTF-8%26oe%3DUTF8%26selm%3D90
3CCF4F3chadngpbecom%2540207.105.83.62%26rnum%3D3

thanks,
Marko

 

Re:Indy TidMessage.Subject decode question


uses IdCoderHeader;

subject:=DecodeHeader('=?iso-8859-4?Q?s=F5najalad.jpg?= ');

hth
--

Bas Gooijen

Quote
"Marko" <condorsoftw...@hot.ee> wrote in message news:3d18b372$1_2@dnews...
> Hello!

> In some cases, message header may contain some language specific (germany,
> estonian) characters. I'm not sure if you can read these chars out, but
> still, some samples : ?, ?, , ?

> In these cases Indy shows the header like this
> =?windows-1257?Q?Palju_=Fnne_s=FCnnip=e4evaks. =?
> ( not important, but should be "Palju ?nne snnip?evaks" or simply in
> english "Happy birthday")

> My question is : is there a way to decode these encoded strings with Indy
or
> should a third party decoder be used?

> I also surfed in newsgroups and found one similar problem, where Kudzu
> indicates that these strings should be automatically decoded....but no
> further solution is provided.

http://groups.google.com/groups?hl=et&lr=&ie=UTF-8&oe=UTF8&threadm=90...
Quote

chadngpbecom%40207.105.83.62&rnum=3&prev=/groups%3Fq%3Dmessage%2Bsubject%2Bd
Quote

ecode%2Bindy%2Bdelphi%26hl%3Det%26lr%3D%26ie%3DUTF-8%26oe%3DUTF8%26selm%3D90

- Show quoted text -

Quote
> 3CCF4F3chadngpbecom%2540207.105.83.62%26rnum%3D3

> thanks,
> Marko

Re:Indy TidMessage.Subject decode question


thanks for your answer but this time DecodeHeader will not work, because
this function searches these chars "=?iso" in the beginning of the string.
my current case begins with "=?windows". I already tried DecodeHeader as a
result of your last hint and this fails.

What else do you suggest to try?

marko

Quote
"Bas Gooijen" <bas_gooi...@yahoo.com> wrote in message

news:3d19dc5c_2@dnews...
Quote
> uses IdCoderHeader;

> subject:=DecodeHeader('=?iso-8859-4?Q?s=F5najalad.jpg?= ');

> hth
> --

> Bas Gooijen

> "Marko" <condorsoftw...@hot.ee> wrote in message

news:3d18b372$1_2@dnews...
Quote
> > Hello!

> > In some cases, message header may contain some language specific
(germany,
> > estonian) characters. I'm not sure if you can read these chars out, but
> > still, some samples : ?, ?, , ?

> > In these cases Indy shows the header like this
> > =?windows-1257?Q?Palju_=Fnne_s=FCnnip=e4evaks. =?
> > ( not important, but should be "Palju ?nne snnip?evaks" or simply in
> > english "Happy birthday")

> > My question is : is there a way to decode these encoded strings with
Indy
> or
> > should a third party decoder be used?

> > I also surfed in newsgroups and found one similar problem, where Kudzu
> > indicates that these strings should be automatically decoded....but no
> > further solution is provided.

http://groups.google.com/groups?hl=et&lr=&ie=UTF-8&oe=UTF8&threadm=90...
Quote

chadngpbecom%40207.105.83.62&rnum=3&prev=/groups%3Fq%3Dmessage%2Bsubject%2Bd
Quote

ecode%2Bindy%2Bdelphi%26hl%3Det%26lr%3D%26ie%3DUTF-8%26oe%3DUTF8%26selm%3D90

- Show quoted text -

Quote
> > 3CCF4F3chadngpbecom%2540207.105.83.62%26rnum%3D3

> > thanks,
> > Marko

Re:Indy TidMessage.Subject decode question


"Marko" <condorsoftw...@hot.ee> wrote in news:3d1a07be$1_1@dnews:

Quote
> this function searches these chars "=?iso" in the beginning of the
> string. my current case begins with "=?windows". I already tried

I've not sen =?windows before. I dont think it handles that. I'm not even sure
if thats legit or not.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

   Want more Indy stuff? Try the Atozed Indy Portal at
        http://www.atozedsoftware.com/
    * More Demos
    * Articles
    * Commercial Support

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Re:Indy TidMessage.Subject decode question


hello kudzu

original message header looks like follows, message body itself is decoded
fine.

----------------------------------------------------------------------

X-Sieve: cmu-sieve 2.0
Return-Path: <j...@eenet.ee>
Received: from relay3.hot.ee (relay3.hot.ee [10.0.0.121])
 by mailhost2.hot.ee (8.11.2/8.11.2) with ESMTP id g5KC2Ee03727
 for <okra...@mailhost2.hot.ee>; Thu, 20 Jun 2002 15:02:14 +0300
Received: from vi.eenet.ee (vi.eenet.ee [193.40.56.244])
 by relay3.hot.ee (8.12.4/8.12.3) with ESMTP id g5KC2EQf014922
 for <okra...@hot.ee>; Thu, 20 Jun 2002 15:02:14 +0300
Received: (from daemon@localhost)
 by vi.eenet.ee (8.9.3/8.9.3/Debian 8.9.3-21) id PAA13129
 for <okra...@hot.ee>; Thu, 20 Jun 2002 15:02:14 +0300
Received: from york ([193.40.220.59])
 by vi.eenet.ee (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id PAA13045;
 Thu, 20 Jun 2002 15:02:13 +0300
Message-ID: <003601c21852$7ce59200$c5df28c1@york>
Reply-To: "Juri Vassiljev \(EENet\)" <j...@eenet.ee>
From: "Juri Vassiljev \(EENet\)" <j...@eenet.ee>
To: "Marko Haug" <okra...@hot.ee>
Subject: =?windows-1257?Q?Palju_=F5nne_s=FCnnip=E4evaks.?=
Date: Thu, 20 Jun 2002 15:03:27 +0300
MIME-Version: 1.0
Content-Type: text/plain;
 charset="windows-1257"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by mail.hot.ee (http://www.hot.ee/)

------------ end of header ------------

marko

Quote
Kudzu <c...@hower.org> wrote in message

news:Xns923A74EA9B052cpubindy@127.0.0.1...
Quote
> "Marko" <condorsoftw...@hot.ee> wrote in news:3d1a07be$1_1@dnews:
> > this function searches these chars "=?iso" in the beginning of the
> > string. my current case begins with "=?windows". I already tried

> I've not sen =?windows before. I dont think it handles that. I'm not even
sure
> if thats legit or not.

> --
> Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
>       "Programming is an art form that fights back"

>    Want more Indy stuff? Try the Atozed Indy Portal at
>         http://www.atozedsoftware.com/
>     * More Demos
>     * Articles
>     * Commercial Support

> Posted by ELKNews 1.0.4-B
> Empower your News Reader! http://www.atozedsoftware.com

Re:Indy TidMessage.Subject decode question


"Marko" <condorsoftw...@hot.ee> wrote in news:3d1af6a5_2@dnews:

Quote
> original message header looks like follows, message body itself is decoded
> fine.

Get the latest dev snapshot. A fix for this was just checked in a few hours
ago.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

   Want more Indy stuff? Try the Atozed Indy Portal at
        http://www.atozedsoftware.com/
    * More Demos
    * Articles
    * Commercial Support

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Re:Indy TidMessage.Subject decode question


"Kudzu" <c...@hower.org> ???Y/???Y ????? ???Y??:
news:Xns923A74EA9B052cpubindy@127.0.0.1...

Quote
> "Marko" <condorsoftw...@hot.ee> wrote in news:3d1a07be$1_1@dnews:
> > this function searches these chars "=?iso" in the beginning of the
> > string. my current case begins with "=?windows". I already tried

> I've not sen =?windows before. I dont think it handles that. I'm not even
sure
> if thats legit or not.

Yes. It is ok.

What you can say about this:

Subject: =?koi8-r?B?4SDUwcvPxSDU2SDXycTFzD8gOy0p?=

;-)))
Or =?koi8-u?...
Or =?ibm866?...
Open registry:
HKCR\Mime\Database\Charset
You can see more than "ISO"
We Russian/Ukrainian (for example) have more than 7 charset's (and well over
aliases: koi8-r can be koi8r, csKOI8-R).
American people have unlimited fun with single "us-ascii" ;-)

PS: Unicode will rescue us...

Re:Indy TidMessage.Subject decode question


"Andrew P.Rybin [Team Indy]" <magic...@mail.ru> wrote in
news:3d1bdcfe$1_2@dnews:

Quote
> What you can say about this:

> Subject: =?koi8-r?B?4SDUwcvPxSDU2SDXycTFzD8gOy0p?=

Everyone is a seperate coding and must be added manually. Be a good project
for you for Indy 10 maybe. :)

Quote
> We Russian/Ukrainian (for example) have more than 7 charset's (and well
> over aliases: koi8-r can be koi8r, csKOI8-R).

I know this all too well. My computer supports all of them. :)

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

   Want more Indy stuff? Try the Atozed Indy Portal at
        http://www.atozedsoftware.com/
    * More Demos
    * Articles
    * Commercial Support

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Re:Indy TidMessage.Subject decode question


"Kudzu" <c...@hower.org> ???Y/???Y ????? ???Y??:
news:Xns923B85445DF85cpubindy@127.0.0.1...

Quote
> "Andrew P.Rybin [Team Indy]" <magic...@mail.ru> wrote in
> news:3d1bdcfe$1_2@dnews:
> > What you can say about this:

> > Subject: =?koi8-r?B?4SDUwcvPxSDU2SDXycTFzD8gOy0p?=

> Everyone is a seperate coding and must be added manually. Be a good
project
> for you for Indy 10 maybe. :)

I'm ready ;-)

Re:Indy TidMessage.Subject decode question


"Marko" <condorsoftw...@hot.ee> wrote in news:3d1a07be$1_1@dnews:

Quote
> this function searches these chars "=?iso" in the beginning of the
> string. my current case begins with "=?windows". I already tried

I've not sen =?windows before. I dont think it handles that. I'm not even sure
if thats legit or not.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

   Want more Indy stuff? Try the Atozed Indy Portal at
        http://www.atozedsoftware.com/
    * More Demos
    * Articles
    * Commercial Support

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Re:Indy TidMessage.Subject decode question


"Marko" <condorsoftw...@hot.ee> wrote in news:3d1af6a5_2@dnews:

Quote
> original message header looks like follows, message body itself is decoded
> fine.

Get the latest dev snapshot. A fix for this was just checked in a few hours
ago.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

   Want more Indy stuff? Try the Atozed Indy Portal at
        http://www.atozedsoftware.com/
    * More Demos
    * Articles
    * Commercial Support

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Re:Indy TidMessage.Subject decode question


"Kudzu" <c...@hower.org> ???Y/???Y ????? ???Y??:
news:Xns923A74EA9B052cpubindy@127.0.0.1...

Quote
> "Marko" <condorsoftw...@hot.ee> wrote in news:3d1a07be$1_1@dnews:
> > this function searches these chars "=?iso" in the beginning of the
> > string. my current case begins with "=?windows". I already tried

> I've not sen =?windows before. I dont think it handles that. I'm not even
sure
> if thats legit or not.

Yes. It is ok.

What you can say about this:

Subject: =?koi8-r?B?4SDUwcvPxSDU2SDXycTFzD8gOy0p?=

;-)))
Or =?koi8-u?...
Or =?ibm866?...
Open registry:
HKCR\Mime\Database\Charset
You can see more than "ISO"
We Russian/Ukrainian (for example) have more than 7 charset's (and well over
aliases: koi8-r can be koi8r, csKOI8-R).
American people have unlimited fun with single "us-ascii" ;-)

PS: Unicode will rescue us...

Re:Indy TidMessage.Subject decode question


"Andrew P.Rybin [Team Indy]" <magic...@mail.ru> wrote in
news:3d1bdcfe$1_2@dnews:

Quote
> What you can say about this:

> Subject: =?koi8-r?B?4SDUwcvPxSDU2SDXycTFzD8gOy0p?=

Everyone is a seperate coding and must be added manually. Be a good project
for you for Indy 10 maybe. :)

Quote
> We Russian/Ukrainian (for example) have more than 7 charset's (and well
> over aliases: koi8-r can be koi8r, csKOI8-R).

I know this all too well. My computer supports all of them. :)

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

   Want more Indy stuff? Try the Atozed Indy Portal at
        http://www.atozedsoftware.com/
    * More Demos
    * Articles
    * Commercial Support

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Other Threads