OSDN Git Service
(root)
/
pukiwiki
/
pukiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8faad1f
)
BugTrack/2392 Fix encoding: die_message() outputs suitable charset
author
umorigu
<umorigu@gmail.com>
Sat, 29 Oct 2016 14:59:12 +0000
(23:59 +0900)
committer
umorigu
<umorigu@gmail.com>
Sat, 29 Oct 2016 14:59:12 +0000
(23:59 +0900)
lib/func.php
patch
|
blob
|
history
diff --git
a/lib/func.php
b/lib/func.php
index
e16ce95
..
bcfe2e3
100644
(file)
--- a/
lib/func.php
+++ b/
lib/func.php
@@
-462,13
+462,17
@@
EOD;
if(defined('SKIN_FILE') && file_exists(SKIN_FILE) && is_readable(SKIN_FILE)) {
catbody($title, $page, $body);
} else {
if(defined('SKIN_FILE') && file_exists(SKIN_FILE) && is_readable(SKIN_FILE)) {
catbody($title, $page, $body);
} else {
- header('Content-Type: text/html; charset=euc-jp');
+ $charset = 'utf-8';
+ if(defined('CONTENT_CHARSET')) {
+ $charset = CONTENT_CHARSET;
+ }
+ header("Content-Type: text/html; charset=$charset");
print <<<EOD
print <<<EOD
-<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"
>
+<!DOCTYPE html>
<html>
<head>
<html>
<head>
+ <meta http-equiv="content-type" content="text/html; charset=$charset">
<title>$title</title>
<title>$title</title>
- <meta http-equiv="content-type" content="text/html; charset=euc-jp">
</head>
<body>
$body
</head>
<body>
$body