spring - Arabic is displayed as ????? in velocity template -


greetings using velocity templates in sending emails , in template have arabic texts

and when sending email, text appears ?????????? don't know why:

encoding set utf-8 before sending email here:

velocityengineutils.mergetemplateintostring(velocityengine,templatename, "utf-8",newmodel); 

i tried add charset in vm, no luck:

<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 

any ideas why such problem occurs ?

i able produce arabic text (تجاوز سعة مكدس) on plain-text email sent spring app. text displayed on gmail thunderbird. here's mail sending logic:

public void send(string fromaddress, string fromname,     string toaddress, string subject,     string template, map<string, object> model) {   mimemessagepreparator preparator = new mimemessagepreparator() {     public void prepare(mimemessage mimemessage) throws exception {       mimemessagehelper message = new mimemessagehelper(           mimemessage, "utf-8");       message.setto(toaddress);       message.setfrom(new internetaddress(fromaddress, fromname));       message.setsubject(subject);       message.settext(velocityengineutils           .mergetemplateintostring(velocityengine, template, "utf-8",                model));     }   };   mailsender.send(preparator); } 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -