Hi, hi, hi little droogies
First of all, sorry for the lame english and the dumb question. After a
quick search on google I found iconv, and some other toys, but the point
is:
I''m making a small webmail app for my company, still taking the first
steps. For instance, if I want to read my INBOX folder and list the
messages:
-------------------------------------------
CONTROLLER =>
def list_inbox
imap = Net::IMAP.new(''xxx.xxx.xxx.xxx'')
imap.authenticate(''LOGIN'',
''username-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org'',
''password'')
imap.select(''INBOX'')
@emails = []
imap.search(["ALL"]).each do |i|
@emails << imap.fetch(i,
"ENVELOPE")[0].attr["ENVELOPE"]
end
imap.disconnect
end
VIEW =>
<h1>Webmail#list_inbox</h1>
<% @emails.each do |i| %>
<%= i.from[0].name %> / <%= i.subject %><br />
<% end %>
-------------------------------------------------
The enconding seems messed up, when the message comes in iso-8859-1
format, it''s preceeded with "=?iso-8859-1?Q?", same for utf-8
"=?UTF-8?Q?". And the accents come encoded too (=E9 => é).How can I
solve this?
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---