Re: How to convert base64 string to utf-8

2004-02-06 Thread Nick Ing-Simmons
ALexander N. Treyner <[EMAIL PROTECTED]> writes: >Hi John, >Your code works perfect. >But I found one strange thing. >For example I have next string: > > hello hello world > >that converted by the mail client to > > hello =?windows-1255?Q?=F9=EC=E5=ED_hello_world?= >

Re: How to convert base64 string to utf-8

2004-02-06 Thread Nick Ing-Simmons
Guido Flohr <[EMAIL PROTECTED]> writes: >ALexander N. Treyner wrote: >> Hello All, >> I'm using utf-8 Postgres database, where I save strings in many languages. >> I have to match the database with strings encoded in mime base64 or >> quoted-printable format. Like next: >> =?utf-8?B?15TXoNeUINee16

Re: How to convert base64 string to utf-8

2004-02-06 Thread Guido Flohr
Hi, ALexander N. Treyner wrote: hello =?windows-1255?Q?=F9=EC=E5=ED_hello_world?= After converting it by code you wrote into utf-8, the "_" is still present between second "hello" and "world". Is it right behavior? You can re-invent the wheel for that problem, or simply use MIME::Words,

Re: How to convert base64 string to utf-8

2004-02-05 Thread John Delacour
At 4:21 pm +0200 5/2/04, ALexander N. Treyner wrote: Hi John, Your code works perfect. But I found one strange thing. For example I have next string: hello ˜ÏÂÌ hello world that converted by the mail client to hello =?windows-1255?Q?=F9=EC=E5=ED_hello_world?= After converting it by co

Re: How to convert base64 string to utf-8

2004-02-05 Thread ALexander N. Treyner
Hi John, Your code works perfect. But I found one strange thing. For example I have next string: hello שלום hello world that converted by the mail client to hello =?windows-1255?Q?=F9=EC=E5=ED_hello_world?= After converting it by code you wrote into utf-8, the "_" is stil

Re: How to convert base64 string to utf-8

2004-02-04 Thread ALexander N. Treyner
John Delacour wrote: skiped use Encode; use MIME::Base64; use MIME::QuotedPrint; my $string; $_ = <<_; =?utf-8?B?15TXoNeUINee16nXlNeZINeR16LXkdeo15nXqi4=?= _ /=\?(.+)\?([BQ])\?(.+)\?=/; my ( $charset, $encoding, $_7bit ) = ( $1, $2, $3 ); if ( $encoding eq 'B' ) { $string = decode_base64 $_7bit } i

Re: How to convert base64 string to utf-8

2004-02-02 Thread John Delacour
At 7:36 pm +0100 2/2/04, Guido Flohr wrote: Unfortunately, you will be out of luck for the somewhat common case of UTF-7 (unless it is available in Encode by now). It is: use Encode; for ( Encode->encodings(":all") ) { print "$_$/" } 7bit-jis AdobeStandardEncoding AdobeSymbol AdobeZdingbat asc

Re: How to convert base64 string to utf-8

2004-02-02 Thread Jarkko Hietaniemi
Unfortunately, you will be out of luck for the somewhat common case of UTF-7 (unless it is available in Encode by now). UTF-7 has been supported since Encode 1.95, perl 5.8.1 had Encode 1.98, and perl is now at 5.8.3 with Encode 1.99. -- Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/

Re: How to convert base64 string to utf-8

2004-02-02 Thread John Delacour
At 5:14 pm +0200 2/2/04, ALexander N. Treyner wrote: Hello All, I'm using utf-8 Postgres database, where I save strings in many languages. I have to match the database with strings encoded in mime base64 or quoted-printable format. Like next: =?utf-8?B?15TXoNeUINee16nXlNeZINeR16LXkdeo15nXqi4=?= o

Re: How to convert base64 string to utf-8

2004-02-02 Thread Guido Flohr
ALexander N. Treyner wrote: Hello All, I'm using utf-8 Postgres database, where I save strings in many languages. I have to match the database with strings encoded in mime base64 or quoted-printable format. Like next: =?utf-8?B?15TXoNeUINee16nXlNeZINeR16LXkdeo15nXqi4=?= or =?KOI8-R?Q?=F0=D2=C9=D7=

Re: How to convert base64 string to utf-8

2004-02-02 Thread David Graff
[EMAIL PROTECTED] said: > Hello All, I'm using utf-8 Postgres database, where I save strings in > many languages. I have to match the database with strings encoded in > mime base64 or quoted-printable format. Like next: > =?utf-8?B?15TXoNeUINee16nXlNeZINeR16LXkdeo15nXqi4=?= or > =?KOI8-R?Q?=F0=D2

How to convert base64 string to utf-8

2004-02-02 Thread ALexander N. Treyner
Hello All, I'm using utf-8 Postgres database, where I save strings in many languages. I have to match the database with strings encoded in mime base64 or quoted-printable format. Like next: =?utf-8?B?15TXoNeUINee16nXlNeZINeR16LXkdeo15nXqi4=?= or =?KOI8-R?Q?=F0=D2=C9=D7=C5=D4=2C_=ED=C9=D2!!!?= I t