Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > NNTPlib encoding issue

Reply
Thread Tools

NNTPlib encoding issue

 
 
mohit_ranka
Guest
Posts: n/a
 
      02-13-2009
I am getting unknown encoding like, "=?Utf-8?B?QWRyaWFu?=
<(E-Mail Removed)>" (quotes for clarity) for name of
the author from nntplib module. which seems like an encoding issue
with NNTPLib module.

What should i do to get author name information in human readable
format.

Thanks and regards,
Mohit Ranka
 
Reply With Quote
 
 
 
 
MRAB
Guest
Posts: n/a
 
      02-13-2009
mohit_ranka wrote:
> I am getting unknown encoding like, "=?Utf-8?B?QWRyaWFu?=
> <(E-Mail Removed)>" (quotes for clarity) for name of
> the author from nntplib module. which seems like an encoding issue
> with NNTPLib module.
>
> What should i do to get author name information in human readable
> format.
>

The original text was encoded in UTF-8 and then into base-64:

=?Utf-8?B?QWRyaWFu?=
^^^^^ UTF-8

=?Utf-8?B?QWRyaWFu?=
^ Base-64

So that's:

>>> "QWRyaWFu".decode("base-64").decode("Utf-8")

u'Adrian'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nntplib encoding problem Laurent Duchesne Python 0 02-28-2011 01:31 AM
NNTPlib::xover problem Helmut Jarausch Python 2 08-07-2006 12:46 PM
get "in reply to" with nntplib Hanman Python 0 04-24-2006 06:34 PM
How to post news articles with NNTPlib python@hope.cz Python 2 01-28-2005 08:14 PM
nntplib: abstraction of threads Rakesh Python 4 01-22-2005 02:42 AM



Advertisments