Revision | 4c2c62a760c591267c7d67d861dbc0e51c1d8e1c (tree) |
---|---|
Zeit | 2005-02-13 12:06:02 |
Autor | henoheno <henoheno> |
Commiter | henoheno |
Cleanup HTTP header related, etc
@@ -1,9 +1,10 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone. |
3 | -// $Id: keitai.skin.php,v 1.6 2005/02/13 02:35:56 henoheno Exp $ | |
3 | +// $Id: keitai.skin.php,v 1.7 2005/02/13 03:06:02 henoheno Exp $ | |
4 | 4 | // |
5 | 5 | // Skin for Embedded devices |
6 | 6 | |
7 | +// ---- | |
7 | 8 | // Prohibit direct access |
8 | 9 | if (! defined('UI_LANG')) die('UI_LANG is not set'); |
9 | 10 |
@@ -11,11 +12,16 @@ global $max_size, $accesskey, $menubar; | ||
11 | 12 | $link = $_LINK; |
12 | 13 | $rw = ! PKWK_READONLY; |
13 | 14 | |
14 | -// Force Shift JIS encode for Japanese embedded browsers and devices | |
15 | +// Output HTTP headers | |
15 | 16 | pkwk_headers_sent(); |
16 | -header('Content-Type: text/html; charset=Shift_JIS'); | |
17 | -$title = mb_convert_encoding($title, 'SJIS', SOURCE_ENCODING); | |
18 | -$body = mb_convert_encoding($body, 'SJIS', SOURCE_ENCODING); | |
17 | +if(LANG == 'ja') { | |
18 | + // Force Shift JIS encode for Japanese embedded browsers and devices | |
19 | + header('Content-Type: text/html; charset=Shift_JIS'); | |
20 | + $title = mb_convert_encoding($title, 'SJIS', SOURCE_ENCODING); | |
21 | + $body = mb_convert_encoding($body, 'SJIS', SOURCE_ENCODING); | |
22 | +} else { | |
23 | + header('Content-Type: text/html; charset=' . CONTENT_CHARSET); | |
24 | +} | |
19 | 25 | |
20 | 26 | // Make 1KByte spare (for header, etc) |
21 | 27 | $max_size = --$max_size * 1024; |