UTF 8 in java wrapper

I have a problem with java wrappers for creating campaign
Ihave a static html page with
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> tag inside
when I open my page with a browser I see the page correctly
when I call the        newCampaign.HtmlUrl = URI.create("page.html"); 
to send my campaign, I see in campaign monitor backoffice my page with wrong characters and obviously it's wrong also in email I received.

To be sure, I used also UTF8 in writing my file and its content
OutputStreamWriter sout = new OutputStreamWriter (new FileOutputStream(new File(nomeFile)),"UTF8");
BufferedWriter  outf = new BufferedWriter(sout);

It seems strange because if I put some words in <strong>ò

roshodgekiss roshodgekiss, 4 years ago

Hi g.delpogetto, welcome to the forums! That's very curious, but it's hard to say as an outsider what's happening here exactly. You are correct in using UTF-8 encoding, but what's not clear is at what point the special characters are becoming corrupted.

If you want to run further code past our dev team, you are more than welcome to email support [at] campaignmonitor.com. We'll do our best to help out :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098