UTF-8 and Norwegian chars

279 views
Skip to first unread message

LilleEngel

unread,
Jul 8, 2010, 10:04:14 AM7/8/10
to MailChimp API Discuss
Hei,

We are using mailchimp API to send out newsletters. We are now trying
to create an Norwegian newsletter with content from this url;
http://www.intrafish.no/ext/mailchimp/no_html.jsp

In a regular browser this page looks ok. And as you see it is coded
with UTF-8 contentType in the head.

But when we send the newsletter with this service;

http://api.mailchimp.com/1.1/?method=campaignCreate&apikey=*TAKEN
OUT*&output=json&type=regular&options[list_id]=5ec83b7cfb&options[generate_text]=true&options[to_email]=Subscribers&options[subject]=Test
no Newsletter - Thursday, July 08, 2010&options[from_name]=Intrafish
Media&options[from_email]=nor...@intrafish.com&content[url]=http://
www.intrafish.no/ext/mailchimp/no_html.jsp

The norwegian chars as æøå / ÅÆØ is either taken out of the text
(Outlook 2007) or displays as ?? (Hotmail). Is there anyway I can
encode my jsp / url so that Mailchimp understands my Norwegian chars?

mvh,
Kjersti

jesse

unread,
Jul 8, 2010, 11:46:31 AM7/8/10
to MailChimp API Discuss
The problem appears to be that many of the characters on that page are
not actually UTF-8 and just adding the content-type header doesn't
actually make it so. The browser's are, in this case, being overly
helpful and either converting the non-UTF8 characters or otherwise
displaying them correctly. We could technically automatically convert
non-UTF8 characters, but we try not to magically modify user content.
Once that's resolved, things should work fine.

Also, if you want to test this more quickly until you get it, you can
create a campaign via the web interface and use the import from url
option on it and check the display using the pop-up preview. The code
the API uses to import from a url is exactly the same.


jesse


On Jul 8, 10:04 am, LilleEngel <kjersti.ronh...@gmail.com> wrote:
> Hei,
>
> We are using mailchimp API to send out newsletters. We are now trying
> to create an Norwegian newsletter with content from this url;http://www.intrafish.no/ext/mailchimp/no_html.jsp
>
> In a regular browser this page looks ok. And as you see it is coded
> with UTF-8 contentType in the head.
>
> But when we send the newsletter with this service;
>
> http://api.mailchimp.com/1.1/?method=campaignCreate&apikey=*TAKEN
> OUT*&output=json&type=regular&options[list_id]=5ec83b7cfb&options[generate_­text]=true&options[to_email]=Subscribers&options[subject]=Test
> no Newsletter - Thursday, July 08, 2010&options[from_name]=Intrafish
> Media&options[from_email]=nore...@intrafish.com&content[url]=http://www.intrafish.no/ext/mailchimp/no_html.jsp

LilleEngel

unread,
Jul 9, 2010, 9:50:08 AM7/9/10
to MailChimp API Discuss
Thanks for you help Jesse.

What fooled me was the browsers kindness. If you look at øæåÅÆØ in a
normal browser it converts them for you despite the meta - utf8
contenttype.

I have now transformed my content with xsl before I send it to
mailchimp - and then everything looks ok. It was a great help to have
an encoding plugin in Firefox. With the plugin you can set the actual
encoding and view the page. Great tool.
Reply all
Reply to author
Forward
0 new messages