Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1124 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

Using an alternative template engine makes TG return wrong charset

Reported by: sakkew Owned by: max
Priority: normal Milestone:
Component: TurboGears Version: 1.0b1
Severity: normal Keywords:
Cc:

Description

ISO-8859-1 is returned by TG instead of UTF-8.

How to reproduce:

  • Create a new app: tg-admin quickstart.
  • Start server.
  • Open main page in browser
  • Encoding of the page is UTF-8.
  • Add to dev.cfg: tg.defaultview = "genshi"
  • Add genshi templates (attached in ticket)
  • Restart server and open main page.
  • Encoding of the page is ISO-8859-1.

An alternative way to solve this is to add this to @expose:

@expose(template="utftest.templates.welcome", content_type='text/html; charset=utf-8')
  • Encoding of the page is now UTF-8.

Attachments

welcome.html Download (482 bytes) - added by sakkew 13 years ago.
master.html Download (892 bytes) - added by sakkew 13 years ago.

Change History

Changed 13 years ago by sakkew

Changed 13 years ago by sakkew

comment:1 Changed 13 years ago by max

  • Owner changed from anonymous to max
  • Status changed from new to assigned

comment:2 Changed 13 years ago by max

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed in Subversion for both 1.0 branch and trunk.

Note: See TracTickets for help on using tickets.