function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ezdhanhussainezdhanhussain 

unknown format in vf page while trying to display chinese language

HI i have a requirement in which i am loading a template from an external server which is in chinese, this template is working fine in external server but when i am trying to display this in visualforce page it is showing like this

如需帮助,请拨打å…�费电è¯�或通过邮件与我们è�”系。身为Visaæ— é™�å�¡æŒ�å�¡äººï¼Œæ‚¨è¿˜å�¯ä»¥å°Šäº«ä»¥ä¸‹ä¼˜è¶Šç¤¼é�‡ï¼š
指定高尔夫俱ä¹�部尊享å…�果岭费优æƒ
ä»¥ä¼˜æƒ ä»·æ ¼åœ¨å…¨ç�ƒ380家机场享å�—机场å��助ã€�快速通关等æœ�务
租车æœ�务折扣优æƒ

When i email the same template it is displaying correctly.. With in the salesforce org it is not formatting prperly. Any suggestions to do this ???
Sonam_SFDCSonam_SFDC
When you create this email template in salesforce using visualforce - make sure you keep the encoding format as UTF-8 and not the defalt on 'General-US & Westren Europe...'

Please change the formating if not already changed and let me know if this helps
Ramu_SFDCRamu_SFDC
Try setting the language attribute on page to chinese. Refer to the following iso codes for languages and set the code appropriately

http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Eg : <apex:page language="en"> this is for engish

Ashish_SFDCAshish_SFDC
Hi Ezdhan, 


Try using the apex:page languege attribute 

language String The language used to display labels that have associated translations in Salesforce. This value overrides the language of the user viewing the page. Possible values for this attribute include any language keys for languages supported by Salesforce, for example, "en" or "en-US".

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_page.htm

For chinese the keys below,

zh-tw Chinese (Taiwan) zh-cn Chinese (PRC)
zh-hk Chinese (Hong Kong SAR) zh-sg Chinese (Singapore)

http://msdn.microsoft.com/en-us/library/ms533052(v=vs.85).aspx


Regards,
Ashish

ezdhanhussainezdhanhussain
{"pairs":[{"key":"subject","value":"Followto Your Request"},{"key":"from","value":"examplemail@gmail.com"}],"payload":"\"<!DOCTYPE html PUBLIC \\\"-\\/\\/W3C\\/\\/DTD XHTML 1.0 Strict\\/\\/EN\\\" \\\"http:\\/\\/www.w3.org\\/TR\\/xhtml1\\/DTD\\/xhtml1-strict.dtd\\\"><html ><head><meta charset=\\\"UTF-8\\\" \\/><meta name=\\\"viewport\\\" content=\\\"width=device-width\\\" \\/><meta http-equiv=\\\"Content-Type\\\" content=\\\"text\\/html; charset=UTF-8\\\" \\/><title>generic<\\/title><style type=\\\"text\\/css\\\">body{\\n\\t\\t\\tfont-family: Arial, Helvetica, sans-serif;\\n\\t\\t\\tfont-size: 12px;\\n\\t\\t\\tbackground-color: white;\\n\\t\\t\\tcolor: #000;\\n\\t\\t\\t-webkit-font-smoothing: antialiased;\\n    }\\n\\t\\t#container{\\n\\t\\t\\twidth: 65%;\\n\\t\\t\\tmargin: 15px auto;\\n\\t\\t\\tbackground-color: white;\\n    }\\n    sup{ \\n      font-size: 10px;\\n    }\\n\\t\\t\\/*iPads (portrait and landscape)*\\/\\n\\t\\t@media only screen and (max-width: 1024px) {\\n\\t\\t\\t#container{\\n\\t\\t\\t\\twidth: 85%;\\n\\t\\t\\t\\tmargin: 15px auto;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\/*Smartphones (portrait and landscape)*\\/\\n\\t\\t@media only screen and (max-width: 480px) {\\n\\t\\t\\t#container{\\n\\t\\t\\t\\twidth: 95%;\\n\\t\\t\\t\\tmargin: 15px auto;\\n\\t\\t\\t}\\n\\t\\t}<\\/style><\\/head><body><div id=\\\"container\\\"><div class=\\\"par parsys\\\"><div class=\\\"adaptiveimage parbase image section\\\"><script type=\\\"text\\/javascript\\\" src=\\\"\\/etc\\/clientlibs\\/granite\\/jquery.min.js\\\"><\\/script><script type=\\\"text\\/javascript\\\" src=\\\"\\/etc\\/clientlibs\\/granite\\/utils.min.js\\\"><\\/script><script type=\\\"text\\/javascript\\\" src=\\\"\\/etc\\/clientlibs\\/granite\\/jquery\\/granite.min.js\\\"><\\/script><script type=\\\"text\\/javascript\\\" src=\\\"\\/etc\\/clientlibs\\/foundation\\/jquery.min.js\\\"><\\/script><script type=\\\"text\\/javascript\\\" src=\\\"\\/libs\\/foundation\\/components\\/adaptiveimage\\/clientlibs.min.js\\\"><\\/script><div data-picture data-alt=''><div data-src='\\/content\\/lc\\/email\\/XXXX-XXXX\\/XXXX-XXXX\\/infinite\\/zh_cn\\/generic\\/jcr:content\\/par\\/adaptiveimage.img.320.low.png\\/1396298660685.png'       data-media=\\\"(min-width: 1px)\\\"><\\/div><div data-src='\\/content\\/lc\\/email\\/XXXX-XXXX\\/XXXX-XXXX\\/infinite\\/zh_cn\\/generic\\/jcr:content\\/par\\/adaptiveimage.img.320.medium.png\\/1396298660685.png'    data-media=\\\"(min-width: 320px)\\\"><\\/div><div data-src='\\/content\\/lc\\/email\\/XXXX-XXXXX\\/XXXX-XXXX\\/infinite\\/zh_cn\\/generic\\/jcr:content\\/par\\/adaptiveimage.img.480.medium.png\\/1396298660685.png'    data-media=\\\"(min-width: 321px)\\\"><\\/div><div data-src='\\/content\\/lc\\/email\\/XXXX-XXXX\\/XXX-XXXX\\/infinite\\/zh_cn\\/generic\\/jcr:content\\/par\\/adaptiveimage.img.476.high.png\\/1396298660685.png'      data-media=\\\"(min-width: 481px)\\\"><\\/div><div data-src='\\/content\\/lc\\/email\\/XXXX-XXXX\\/XXXX-XXXXX\\/infinite\\/zh_cn\\/generic\\/jcr:content\\/par\\/adaptiveimage.img.620.high.png\\/1396298660685.png'      data-media=\\\"(min-width: 769px)\\\"><\\/div><div data-src='\\/content\\/lc\\/email\\/XXXX-XXXX\\/XXXX-XXXX\\/infinite\\/zh_cn\\/generic\\/jcr:content\\/par\\/adaptiveimage.img.full.high.png\\/1396298660685.png'     data-media=\\\"(min-width: 1025px)\\\"><\\/div><noscript><img src='\\/content\\/lc\\/email\\/XXXX-XXXX\\/XXXX-XXXX\\/infinite\\/zh_cn\\/generic\\/_jcr_content\\/par\\/adaptiveimage.img.320.low.png\\/1396298660685.png' alt=''><\\/noscript><\\/div><\\/div><div class=\\\"emailcomponent section\\\"><table style=\\\"width:100%;\\\"><tr style=\\\"\\\"><!-- LC - SALUTATION --><td style=\\\"padding: 15px 20px 10px 20px;\\\"><p style=\\\"font-weight: normal; margin: 0px;\\\"><editable name=\\\"salutation\\\">亲爱的 {!Contact.Name}<\\/editable><\\/p><\\/td><\\/tr><tr style=\\\"\\\"><!-- CLIENT - OPENING --><td style=\\\"padding: 6px 20px;\\\"><p style=\\\"font-weight: normal; margin: 0px;\\\">感谢您致电Visaæ— é™�å�¡ç§˜ä¹¦æœ�务中心并让我们为您æ��供相关å��助。请您在方便的时候æµ�览以下相关信æ�¯ã€‚<\\/p><\\/td><\\/tr><\\/table><table style=\\\"width:100%;\\\"><!-- LC - BODY --><tr><td style=\\\"padding: 6px 20px;\\\" ><p style=\\\"margin:0px;\\\"><editable name=\\\"body\\\">Edit here<\\/editable><\\/p><\\/td><\\/tr><\\/table><table style=\\\"width:100%;\\\"><tr style=\\\"\\\"><!-- CLIENT - CLOSING --><td style=\\\"padding: 6px 20px;\\\"><p style=\\\"margin:0px;\\\">如需帮助,请拨打å…�费电è¯�或通过邮件与我们è�”系。\\n身为Visaæ— é™�å�¡æŒ�å�¡äººï¼Œæ‚¨è¿˜å�¯ä»¥å°Šäº«ä»¥ä¸‹ä¼˜è¶Šç¤¼é�‡ï¼š<br><ul><li>指定高尔夫俱ä¹�部尊享å…�æžœå²­è´¹ä¼˜æƒ <\\/li><li>ä»¥ä¼˜æƒ ä»·æ ¼åœ¨å…¨ç�ƒ380家机场享å�—机场å��助ã€�快速通关等æœ�务<\\/li><li>租车æœ�åŠ¡æŠ˜æ‰£ä¼˜æƒ <\\/li><\\/ul>详情请æµ�览<a href=\\\"http:\\/\\/www.visainfinite.cn\\\">www.visainfinite.cn<\\/a><br><br>您的æ„�è§�对我们很é‡�è¦�。请您å��助我们æ��供给您最优质的æœ�务。点击<a href=\\\"http:\\/\\/www.zoomerang.com\\/survey\\/web22bmy5urfcp\\\">这里<\\/a>完æˆ�您的æ„�è§�调查。<\\/p><\\/td><\\/tr><tr style=\\\"\\\"><!-- LC - LINKS --><td style=\\\"padding: 6px 20px;\\\"><p style=\\\"margin:0px;\\\"><\\/p><\\/td><\\/tr><tr style=\\\"\\\"><!-- LC - SIGNATURE --><td style=\\\"padding: 6px 20px;\\\"><p style=\\\"margin:0px 0px 5px 0px;\\\">Sincerely,<\\/p><!-- NAME --><p style=\\\"margin:0px; font-size: 13px;\\\">{!User.Name}<\\/p><!-- TITLE --><p style=\\\"margin:0px; color: #666;\\\">Visaæ— é™�å�¡ç§˜ä¹¦æœ�务中心<\\/p><\\/td><\\/tr><tr><!-- LC - CONTACT INFO --><td style=\\\"padding: 6px 20px; color: #666;\\\"><p style=\\\"margin:0px;\\\"><b>感谢您的信赖和支æŒ�ï¼�<\\/b><\\/p><!-- PHONE --><p style=\\\"margin:0px;\\\"><\\/p><!-- FAX --><p style=\\\"margin:0px;\\\"><\\/p><!-- EMAIL --><p style=\\\"margin:0px;\\\"><\\/p><\\/td><\\/tr><tr style=\\\"\\\"><!-- CLIENT - DISCLAIMER --><td style=\\\"padding: 10px 20px; color: #666; font-size: 9px;\\\"><p style=\\\"margin:0px 0px 10px 0px;\\\">通过Visaæ— é™�å�¡ç§˜ä¹¦æœ�务中心订购的商å“�ã€� æœ�务,或者其他任何æœ�务,å�‡ä¸ºä¸�å�Œçš„第三方供应商æ��供,与Visaæ— å…³ã€‚Visaä¸�å¯¹è¿™äº›ä¾›åº”å•†è¡Œä¸ºï¼Œè¿›è¡Œå®¡æ ¸æˆ–æŽˆæ�ƒã€‚对于Visaæ— é™�å�¡ç§˜ä¹¦æœ�务中心æ��供的商å“�或者æœ�务,Visaä¸�作任何担ä¿�或ä¿�è¯�ï¼ˆæ— è®ºæ˜Žç¤ºæˆ–æš—ç¤ºï¼‰ï¼Œä¸�承担任何责任。通过VISAæ— é™�å�¡ç§˜ä¹¦æœ�务中心购买的商å“�或æœ�务所å�‘生的费用,å�‡ç”±æŒ�å�¡äººæ‰¿æ‹…和支付。<\\/p><\\/td><\\/tr><\\/table><\\/div><\\/div><\\/div><\\/body><\\/html>\"","result":

Hi developers thank you for your valuable suggestions.. I tried above mentioned methods. I think there is a problem in the JSON Response itself.. i am posting the response i am getting. Kindly suggest me a way to do this..