01200: Charset hardcoded in $HTTPHeaders

Summary: Charset hardcoded in $HTTPHeaders
Created: 2010-05-29 17:32
Status: Closed - replied
Category: Feature
From: DaveG
Assigned:
Priority: 2
Version: 2.2.15
OS: n/a

Description: pmwiki.php hardcodes $HTTPHeaders to use ISO-8859-1; shouldn't it default to $Charset?

Current:

$Charset = 'ISO-8859-1';
$HTTPHeaders = array(
  "Expires: Tue, 01 Jan 2002 00:00:00 GMT",
  "Cache-Control: no-store, no-cache, must-revalidate",
  "Content-type: text/html; charset=ISO-8859-1;");

Proposed:

$Charset = 'ISO-8859-1';
$HTTPHeaders = array(
  "Expires: Tue, 01 Jan 2002 00:00:00 GMT",
  "Cache-Control: no-store, no-cache, must-revalidate",
  "Content-type: text/html; charset=$Charset;");

At the moment it would change nothing as $Charset is still 'ISO-8859-1'. This code block is before local php configurations are included and before $Charset could be changed. A recipe can modify the headers, like in scripts/xlpage-utf-8.php. --Petko May 30, 2010, at 03:26 PM