In one of my project , there are pages(e.g. detail page) with vb script page template and few pages( e. g. 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.
When having encoding issues, it is always a good idea to run through the 7 checkpoints highlighted by Elena Serghie on her blog.