[Zope-Checkins] CVS: Zope/lib/python/App/dtml - manage_page_header.dtml:1.11.32.2
Toby Dickenson
tdickenson@geminidataloggers.com
Tue, 28 Jan 2003 10:01:09 -0500
Update of /cvs-repository/Zope/lib/python/App/dtml
In directory cvs.zope.org:/tmp/cvs-serv7294/lib/python/App/dtml
Modified Files:
Tag: Zope-2_6-branch
manage_page_header.dtml
Log Message:
merged toby-charset-branch - bug fixes for non-latin1 users who cant use unicode yet
=== Zope/lib/python/App/dtml/manage_page_header.dtml 1.11.32.1 => 1.11.32.2 ===
--- Zope/lib/python/App/dtml/manage_page_header.dtml:1.11.32.1 Sun Dec 22 11:16:14 2002
+++ Zope/lib/python/App/dtml/manage_page_header.dtml Tue Jan 28 10:00:37 2003
@@ -1,11 +1,29 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
-<dtml-unless management_page_charset>
-<dtml-call "REQUEST.set('management_page_charset','iso-8859-1')">
-</dtml-unless>
-<meta http-equiv="content-type" content="text/html;charset=<dtml-var management_page_charset>">
-<dtml-call "RESPONSE.setHeader('content-type','text/html;charset='+management_page_charset)">
+
+<dtml-if "REQUEST.get('management_page_charset')">
+ <dtml-comment>
+ A page-specific encoding specification. Good.
+ </dtml-comment>
+<dtml-elif management_page_charset>
+ <dtml-comment>
+ A site-global encoding specification in a property.
+ Note that this feature only works if there are no unicode objects
+ around. This means that this feature is not likely to be supported
+ in all future versions of zope.
+ </dtml-comment>
+ <dtml-call "REQUEST.set('management_page_charset',_['management_page_charset'])">
+<dtml-else>
+ <dtml-comment>
+ No encoding specification. Most pages are like this.
+ </dtml-comment>
+ <dtml-call "REQUEST.set('management_page_charset','iso-8859-1')">
+</dtml-if>
+
+<meta http-equiv="content-type" content="text/html;charset=<dtml-var "REQUEST['management_page_charset']">">
+<dtml-call "RESPONSE.setHeader('content-type','text/html;charset='+REQUEST['management_page_charset'])">
+
<title><dtml-if title>&dtml-title;</dtml-if></title>
<dtml-let ag="REQUEST.get('HTTP_USER_AGENT', '')"
is_nav4="ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0"