4

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.

Community
  • 1
  • 1
Ram Saurabh
  • 1,586
  • 8
  • 27
  • 1
    Can you try to follow http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/task_4AFE6D6DFC50425D98F98B83C82E13A4 to define the property "-Dfile.encoding=UTF8"? It could be that all you need to do is to set the default encoding on the JVM to UTF-8. – Daniel Neagu Feb 14 '13 at 15:24
  • 1
    And don't forget the 7 checkpoints: http://elenaserghie.blogspot.nl/2012/01/7-clues-to-solve-character-encoding.html – Nuno Linhares Feb 14 '13 at 16:27
  • Thanks Daniel and Nuno for your useful comments. issue get resolved by overriding encoding at page level. – Ram Saurabh Feb 15 '13 at 08:08
  • @NunoLinhares: can you post your comment as an answer so that Ram can accept it? – Daniel Neagu Feb 15 '13 at 10:25

1 Answers1

2

When having encoding issues, it is always a good idea to run through the 7 checkpoints highlighted by Elena Serghie on her blog.

Nuno Linhares
  • 10,214
  • 1
  • 22
  • 42