Re: decoding UTF-8

2016-03-15 Thread Jon LaBadie
On Tue, Mar 15, 2016 at 11:18:47AM +0100, Ionel Mugurel Ciobîcă wrote: > On 14-03-2016, at 17h 30'55", Jon LaBadie wrote about "decoding UTF-8" > > I frequently find headers (mostly Subject, but also From/To) > > that I assume are some representation form for a UTF-8 encoded > > string as they

Re: decoding UTF-8

2016-03-15 Thread Joerg Dorchain
On Tue, Mar 15, 2016 at 01:23:37PM +0100, Gabriel Philippe wrote: > > Quite funny, I spent some time on it yesterday... > > This is rfc2047 encoding [1]. It can probably use other charsets (not > only UTF-8). > > The best way I found is to pipe it through perl -MEncode -ne 'print >

Re: decoding UTF-8

2016-03-15 Thread Gabriel Philippe
On Mon, Mar 14, 2016 at 10:30 PM, Jon LaBadie wrote: > I frequently find headers (mostly Subject, but also From/To) > that I assume are some representation form for a UTF-8 encoded > string as they start with "=?UTF-8?" and end with "=?= ". > For example: > > To:

Re: decoding UTF-8

2016-03-15 Thread Ionel Mugurel Ciobîcă
Hi, That should work automatically. If after =?UTF-8 there is ?Q then the non-ascii characters (and =) are represented by their hexadecimal representation, for example ç is =C3=A7. If after =?UTF-8 there is ?B then all characters are encoded using an algorithm that takes 6bits at the time. You