Gmail API decoding messages in Javascript
I am having serious problems decoding the message body of the emails I get using the Gmail API. I want to grab the message content and put the content in a div. I am using a base64 decoder, which I know won't decode emails encoded differently, but I am not sure how to check an email to decide which decoder to use -- emails that say they are utf-8 encoded are successfully decoded by the base64 decoder, but not be a utf-8 decoder. I've been researching email decoding for several days now, and I've learned that I am a little out of my league here. I haven't done much work with coding around email