8

I've set the publication target within SDL Tridion to push files (aspx) as UTF-8.

The pages are published but i'm still seeing some weird encoding issues when rendered in a browser.

I can edit the files on the server using notepad and save them as UTF-8, which fixes the issue. So I'm a little stuck as to why this is happening, and annoyingly i've seen this before but cannot remember how it was resolved.

I have tried some other options in the publishing target for example 'System Default' but i'm still seeing the same issue.

Thanks

John

johnwinter
  • 3,624
  • 15
  • 24

3 Answers3

8

Did you try these 7 steps to solve encoding issues from Elena?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • I wish I could also chose this as the 'winning answer' this link is very useful in walking through the various items that could cause encoding issues, both in .Net and Java environments. Thanks! – johnwinter May 01 '12 at 15:23
5

In IIS / .NET I never had problems after setting the Publication Target to UTF-8 and setting this in web.config:

<globalization fileEncoding="UTF-8" requestEncoding="UTF-8" 
responseEncoding="UTF-8"/>

If you're using a Windows-Service based deployer you may want to set the JVM encoding to UTF-8, as explained here.

Nuno Linhares
  • 10,214
  • 1
  • 22
  • 42
  • 1
    Thanks Puf and Nuno - this was indeed one of the points in Elena's excellent post about the subject. Adding the node above to the section of the web.config file exactly as above resolved this. – johnwinter May 01 '12 at 15:22
1

If this is a system you've inherited from someone else, check to make sure the code page isn't explicitly set in the templating. This would override the default set on the publication target.

Dominic Cronin
  • 6,062
  • 2
  • 23
  • 56
  • Definitely worth checking. Here is the code to set the encoding request and response attributes in .Net 4 (that would set it to UTF-8): `<%@ Page RequestEncoding="utf-8" ResponseEncoding="utf-8" %>` – Jonathan Williams Mar 11 '13 at 08:45
  • Jonathon - that's code that tells ASP.NET to serve the page as utf-8. In a Tridion template, you can also set the code page, which tells Tridion to produce its output in a given encoding, overriding the setting on the publication target. Of course, the ASP settings are also relevant: it all has to join up. – Dominic Cronin Mar 11 '13 at 10:14
  • Ah yes. I misinterpreted your answer and thought that when you said "make sure the code page isn't explicitly set in the templating" that you were referring to the output ASP.NET code. Thank you for clarifying. – Jonathan Williams Mar 11 '13 at 11:31