In one of my project , there are pages(eg detail page) with vb script page template and few pages( eg homepage) with razor. We have £ sign in the text in the one of component's field( named as title).
At home page £ get encoded with ? and at detail page it is as desired, means £.
When I run this home page in template builder it looks fine (£) and in page source (at presentation server) it get encoded in ? symbol.
Now I think that issue is somewhere at publishing. We have already set publishing target for encoding UTF-8 and both pages ( Home and detail ) get published from this same publication target so how it can behave differently for these pages.
Even common master page of this website also contains
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
I Included below tag in the web config to shoot out this issue.
<globalization fileEncoding="UTF-8" requestEncoding="UTF-8" responseEncoding="UTF-8"/>
By doing this , at detail page £ gets encoded in some garbage characters(? symbols or rectangle boxes).
Now the points in my mind are
-Issue may be because of razor but the razor output is perfect in the template builder.
-Issue may be at publishing time but both pages get published with same publication target(UTF-8).
Could anybody give me a right direction to shoot out this issue.
遇到编码问题时,最好通过Elena Serghie在其博客中突出显示的7个检查点进行操作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.