Prev: redirect_to(user_contacts_path(@current_user)) error
Next: speeding up "gem1.9 install" during development
From: Shea Barton on 5 Jul 2010 01:05 Is there any existing functions or external gems that can take a generic string and parse for charset markers, converting that parts of the string to their appropriate charsets? For example, theres an email with the headers Date: Sat, 03 Jul 2010 04:00:29 EDT From: =?iso-8859-1?B?U0FU?= <CollegeBoard(a)noreply.collegeboard.org> Subject: =?iso-8859-1?B?VGhlIE9mZmljaWFsIFNBVCBRdWVzdGlvbiBvZiB0aGUgRGF5?= How can I convert this to what it should be, Date: Sat, 03 Jul 2010 04:00:29 EDT From: SAT <CollegeBoard(a)noreply.collegeboard.org> Subject: SAT Question of the Day -- Posted via http://www.ruby-forum.com/.
From: Brian Candler on 5 Jul 2010 06:15
Shea Barton wrote: > Is there any existing functions or external gems that can take a generic > string and parse for charset markers, converting that parts of the > string to their appropriate charsets? > > For example, theres an email with the headers > Date: Sat, 03 Jul 2010 04:00:29 EDT > From: =?iso-8859-1?B?U0FU?= <CollegeBoard(a)noreply.collegeboard.org> > Subject: > =?iso-8859-1?B?VGhlIE9mZmljaWFsIFNBVCBRdWVzdGlvbiBvZiB0aGUgRGF5?= > > How can I convert this to what it should be, > Date: Sat, 03 Jul 2010 04:00:29 EDT > From: SAT <CollegeBoard(a)noreply.collegeboard.org> > Subject: SAT Question of the Day Not answering your question directly, but this syntax is specific to MIME encoding of E-mail headers: http://en.wikipedia.org/wiki/MIME#Encoded-Word So if you look at ruby MIME toolkits you may find what you're looking for. -- Posted via http://www.ruby-forum.com/. |