Index: trunk/phase3/includes/RawPage.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | var $mContentType, $mExpandTemplates; |
26 | 26 | |
27 | 27 | function __construct( Article $article, $request = false ) { |
28 | | - global $wgRequest, $wgInputEncoding, $wgSquidMaxage, $wgJsMimeType, $wgGroupPermissions; |
| 28 | + global $wgRequest, $wgSquidMaxage, $wgJsMimeType, $wgGroupPermissions; |
29 | 29 | |
30 | 30 | $allowedCTypes = array( 'text/x-wiki', $wgJsMimeType, 'text/css', 'application/x-zope-edit' ); |
31 | 31 | $this->mArticle = $article; |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | } else { |
91 | 91 | $this->mGen = false; |
92 | 92 | } |
93 | | - $this->mCharset = $wgInputEncoding; |
| 93 | + $this->mCharset = 'UTF-8'; |
94 | 94 | |
95 | 95 | # Force caching for CSS and JS raw content, default: 5 minutes |
96 | 96 | if( is_null( $smaxage ) && ( $ctype == 'text/css' || $ctype == $wgJsMimeType ) ) { |
Index: trunk/phase3/includes/Exception.php |
— | — | @@ -221,11 +221,11 @@ |
222 | 222 | * $wgOut to output the exception. |
223 | 223 | */ |
224 | 224 | function htmlHeader() { |
225 | | - global $wgLogo, $wgOutputEncoding, $wgLang; |
| 225 | + global $wgLogo, $wgLang; |
226 | 226 | |
227 | 227 | if ( !headers_sent() ) { |
228 | 228 | header( 'HTTP/1.0 500 Internal Server Error' ); |
229 | | - header( 'Content-type: text/html; charset=' . $wgOutputEncoding ); |
| 229 | + header( 'Content-type: text/html; charset=UTF-8' ); |
230 | 230 | /* Don't cache error pages! They cause no end of trouble... */ |
231 | 231 | header( 'Cache-control: none' ); |
232 | 232 | header( 'Pragma: nocache' ); |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1870,11 +1870,6 @@ |
1871 | 1871 | 'simple', |
1872 | 1872 | ); |
1873 | 1873 | |
1874 | | -/** @deprecated Since MediaWiki 1.5, this must always be set to UTF-8. */ |
1875 | | -$wgInputEncoding = 'UTF-8'; |
1876 | | -/** @deprecated Since MediaWiki 1.5, this must always be set to UTF-8. */ |
1877 | | -$wgOutputEncoding = 'UTF-8'; |
1878 | | - |
1879 | 1874 | /** |
1880 | 1875 | * Character set for use in the article edit box. Language-specific encodings |
1881 | 1876 | * may be defined. |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -760,8 +760,8 @@ |
761 | 761 | # Upconvert on demand. |
762 | 762 | # ("utf8" checked for compatibility with some broken |
763 | 763 | # conversion scripts 2008-12-30) |
764 | | - global $wgInputEncoding, $wgContLang; |
765 | | - $text = $wgContLang->iconv( $wgLegacyEncoding, $wgInputEncoding, $text ); |
| 764 | + global $wgContLang; |
| 765 | + $text = $wgContLang->iconv( $wgLegacyEncoding, 'UTF-8', $text ); |
766 | 766 | } |
767 | 767 | } |
768 | 768 | wfProfileOut( __METHOD__ ); |
Index: trunk/phase3/includes/Metadata.php |
— | — | @@ -212,11 +212,9 @@ |
213 | 213 | * begin of the page |
214 | 214 | */ |
215 | 215 | protected function prologue() { |
216 | | - global $wgOutputEncoding; |
217 | | - |
218 | 216 | $url = htmlspecialchars( $this->reallyFullUrl() ); |
219 | 217 | print <<<PROLOGUE |
220 | | -<?xml version="1.0" encoding="{$wgOutputEncoding}" ?> |
| 218 | +<?xml version="1.0" encoding="UTF-8" ?> |
221 | 219 | <!DOCTYPE rdf:RDF PUBLIC "-//DUBLIN CORE//DCMES DTD 2002/07/31//EN" "http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.dtd"> |
222 | 220 | <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
223 | 221 | xmlns:dc="http://purl.org/dc/elements/1.1/"> |
— | — | @@ -269,9 +267,8 @@ |
270 | 268 | } |
271 | 269 | |
272 | 270 | protected function prologue() { |
273 | | - global $wgOutputEncoding; |
274 | 271 | echo <<<PROLOGUE |
275 | | -<?xml version='1.0' encoding="{$wgOutputEncoding}" ?> |
| 272 | +<?xml version='1.0' encoding="UTF-8" ?> |
276 | 273 | <rdf:RDF xmlns:cc="http://web.resource.org/cc/" |
277 | 274 | xmlns:dc="http://purl.org/dc/elements/1.1/" |
278 | 275 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> |
Index: trunk/phase3/includes/ExternalEdit.php |
— | — | @@ -21,10 +21,9 @@ |
22 | 22 | class ExternalEdit { |
23 | 23 | |
24 | 24 | function __construct( $article, $mode ) { |
25 | | - global $wgInputEncoding; |
26 | 25 | $this->mArticle =& $article; |
27 | 26 | $this->mTitle =& $article->mTitle; |
28 | | - $this->mCharset = $wgInputEncoding; |
| 27 | + $this->mCharset = 'UTF-8'; |
29 | 28 | $this->mMode = $mode; |
30 | 29 | } |
31 | 30 | |
Index: trunk/phase3/includes/Html.php |
— | — | @@ -609,9 +609,9 @@ |
610 | 610 | public static function htmlHeader( $attribs = array() ) { |
611 | 611 | $ret = ''; |
612 | 612 | |
613 | | - global $wgMimeType, $wgOutputEncoding; |
| 613 | + global $wgMimeType; |
614 | 614 | if ( self::isXmlMimeType( $wgMimeType ) ) { |
615 | | - $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n"; |
| 615 | + $ret .= "<?xml version=\"1.0\" encoding=\"UTF-8\" ?" . ">\n"; |
616 | 616 | } |
617 | 617 | |
618 | 618 | global $wgHtml5, $wgHtml5Version, $wgDocType, $wgDTD; |
Index: trunk/phase3/includes/cache/HTMLFileCache.php |
— | — | @@ -155,14 +155,14 @@ |
156 | 156 | |
157 | 157 | /* Working directory to/from output */ |
158 | 158 | public function loadFromFileCache() { |
159 | | - global $wgOut, $wgMimeType, $wgOutputEncoding, $wgLanguageCode; |
| 159 | + global $wgOut, $wgMimeType, $wgLanguageCode; |
160 | 160 | wfDebug( __METHOD__ . "()\n"); |
161 | 161 | $filename = $this->fileCacheName(); |
162 | 162 | // Raw pages should handle cache control on their own, |
163 | 163 | // even when using file cache. This reduces hits from clients. |
164 | 164 | if( $this->mType !== 'raw' ) { |
165 | 165 | $wgOut->sendCacheControl(); |
166 | | - header( "Content-Type: $wgMimeType; charset={$wgOutputEncoding}" ); |
| 166 | + header( "Content-Type: $wgMimeType; charset=UTF-8" ); |
167 | 167 | header( "Content-Language: $wgLanguageCode" ); |
168 | 168 | } |
169 | 169 | |
Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | * @return Status object |
112 | 112 | */ |
113 | 113 | public static function send( $to, $from, $subject, $body, $replyto = null, $contentType = null ) { |
114 | | - global $wgSMTP, $wgOutputEncoding, $wgEnotifImpersonal; |
| 114 | + global $wgSMTP, $wgEnotifImpersonal; |
115 | 115 | global $wgEnotifMaxRecips, $wgAdditionalMailParams; |
116 | 116 | |
117 | 117 | if ( is_array( $to ) ) { |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | $headers['Date'] = date( 'r' ); |
166 | 166 | $headers['MIME-Version'] = '1.0'; |
167 | 167 | $headers['Content-type'] = ( is_null( $contentType ) ? |
168 | | - 'text/plain; charset=' . $wgOutputEncoding : $contentType ); |
| 168 | + 'text/plain; charset=UTF-8' : $contentType ); |
169 | 169 | $headers['Content-transfer-encoding'] = '8bit'; |
170 | 170 | $headers['Message-ID'] = "<$msgid@" . $wgSMTP['IDHost'] . '>'; // FIXME |
171 | 171 | $headers['X-Mailer'] = 'MediaWiki mailer'; |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | $endl = "\n"; |
205 | 205 | } |
206 | 206 | $ctype = ( is_null( $contentType ) ? |
207 | | - 'text/plain; charset=' . $wgOutputEncoding : $contentType ); |
| 207 | + 'text/plain; charset=UTF-8' : $contentType ); |
208 | 208 | $headers = |
209 | 209 | "MIME-Version: 1.0$endl" . |
210 | 210 | "Content-type: $ctype$endl" . |
— | — | @@ -277,8 +277,7 @@ |
278 | 278 | public static function quotedPrintable( $string, $charset = '' ) { |
279 | 279 | # Probably incomplete; see RFC 2045 |
280 | 280 | if( empty( $charset ) ) { |
281 | | - global $wgInputEncoding; |
282 | | - $charset = $wgInputEncoding; |
| 281 | + $charset = 'UTF-8'; |
283 | 282 | } |
284 | 283 | $charset = strtoupper( $charset ); |
285 | 284 | $charset = str_replace( 'ISO-8859', 'ISO8859', $charset ); // ? |
Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -130,9 +130,9 @@ |
131 | 131 | # we'll use the application/x-external-editor interface to call |
132 | 132 | # an external diff tool like kompare, kdiff3, etc. |
133 | 133 | if ( $wgUseExternalEditor && $wgUser->getOption( 'externaldiff' ) ) { |
134 | | - global $wgInputEncoding, $wgServer, $wgScript, $wgLang; |
| 134 | + global $wgServer, $wgScript, $wgLang; |
135 | 135 | $wgOut->disable(); |
136 | | - header ( "Content-type: application/x-external-editor; charset=" . $wgInputEncoding ); |
| 136 | + header ( "Content-type: application/x-external-editor; charset=UTF-8" ); |
137 | 137 | $url1 = $this->mTitle->getFullURL( array( |
138 | 138 | 'action' => 'raw', |
139 | 139 | 'oldid' => $this->mOldid |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1838,7 +1838,6 @@ |
1839 | 1839 | * the object, let's actually output it: |
1840 | 1840 | */ |
1841 | 1841 | public function output() { |
1842 | | - global $wgOutputEncoding; |
1843 | 1842 | global $wgLanguageCode, $wgDebugRedirects, $wgMimeType; |
1844 | 1843 | |
1845 | 1844 | if( $this->mDoNothing ) { |
— | — | @@ -1882,7 +1881,7 @@ |
1883 | 1882 | # Buffer output; final headers may depend on later processing |
1884 | 1883 | ob_start(); |
1885 | 1884 | |
1886 | | - $response->header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" ); |
| 1885 | + $response->header( "Content-type: $wgMimeType; charset=UTF-8" ); |
1887 | 1886 | $response->header( 'Content-language: ' . $wgLanguageCode ); |
1888 | 1887 | |
1889 | 1888 | // Prevent framing, if requested |
— | — | @@ -1919,11 +1918,11 @@ |
1920 | 1919 | * @param $ins String: the string to output |
1921 | 1920 | */ |
1922 | 1921 | public function out( $ins ) { |
1923 | | - global $wgInputEncoding, $wgOutputEncoding, $wgContLang; |
1924 | | - if ( 0 == strcmp( $wgInputEncoding, $wgOutputEncoding ) ) { |
| 1922 | + global $wgContLang; |
| 1923 | + if ( 0 == strcmp( 'UTF-8', 'UTF-8' ) ) { |
1925 | 1924 | $outs = $ins; |
1926 | 1925 | } else { |
1927 | | - $outs = $wgContLang->iconv( $wgInputEncoding, $wgOutputEncoding, $ins ); |
| 1926 | + $outs = $wgContLang->iconv( 'UTF-8', 'UTF-8', $ins ); |
1928 | 1927 | if ( false === $outs ) { |
1929 | 1928 | $outs = $ins; |
1930 | 1929 | } |
— | — | @@ -2684,7 +2683,7 @@ |
2685 | 2684 | */ |
2686 | 2685 | public function getHeadLinks( Skin $sk, $addContentType = false ) { |
2687 | 2686 | global $wgUniversalEditButton, $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI, |
2688 | | - $wgSitename, $wgVersion, $wgHtml5, $wgMimeType, $wgOutputEncoding, |
| 2687 | + $wgSitename, $wgVersion, $wgHtml5, $wgMimeType, |
2689 | 2688 | $wgFeed, $wgOverrideSiteFeed, $wgAdvertisedFeedTypes, |
2690 | 2689 | $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf, |
2691 | 2690 | $wgDisableLangConversion, $wgCanonicalLanguageLinks, $wgContLang, |
— | — | @@ -2696,11 +2695,11 @@ |
2697 | 2696 | if ( $wgHtml5 ) { |
2698 | 2697 | # More succinct than <meta http-equiv=Content-Type>, has the |
2699 | 2698 | # same effect |
2700 | | - $tags[] = Html::element( 'meta', array( 'charset' => $wgOutputEncoding ) ); |
| 2699 | + $tags[] = Html::element( 'meta', array( 'charset' => 'UTF-8' ) ); |
2701 | 2700 | } else { |
2702 | 2701 | $tags[] = Html::element( 'meta', array( |
2703 | 2702 | 'http-equiv' => 'Content-Type', |
2704 | | - 'content' => "$wgMimeType; charset=$wgOutputEncoding" |
| 2703 | + 'content' => "$wgMimeType; charset=UTF-8" |
2705 | 2704 | ) ); |
2706 | 2705 | $tags[] = Html::element( 'meta', array( // bug 15835 |
2707 | 2706 | 'http-equiv' => 'Content-Style-Type', |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -134,7 +134,7 @@ |
135 | 135 | function outputPage( OutputPage $out ) { |
136 | 136 | global $wgUser, $wgLang, $wgContLang; |
137 | 137 | global $wgScript, $wgStylePath, $wgLanguageCode; |
138 | | - global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest; |
| 138 | + global $wgMimeType, $wgJsMimeType, $wgRequest; |
139 | 139 | global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces, $wgHtml5Version; |
140 | 140 | global $wgDisableCounters, $wgLogo, $wgHideInterlanguageLinks; |
141 | 141 | global $wgMaxCredits, $wgShowCreditsIfMax; |
— | — | @@ -274,7 +274,7 @@ |
275 | 275 | |
276 | 276 | $tpl->setRef( 'mimetype', $wgMimeType ); |
277 | 277 | $tpl->setRef( 'jsmimetype', $wgJsMimeType ); |
278 | | - $tpl->setRef( 'charset', $wgOutputEncoding ); |
| 278 | + $tpl->setRef( 'charset', 'UTF-8' ); |
279 | 279 | $tpl->setRef( 'wgScript', $wgScript ); |
280 | 280 | $tpl->setRef( 'skinname', $this->skinname ); |
281 | 281 | $tpl->set( 'skinclass', get_class( $this ) ); |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -193,14 +193,13 @@ |
194 | 194 | wfProfileOut( __METHOD__ ); |
195 | 195 | return; |
196 | 196 | } |
197 | | - global $wgInputEncoding; |
198 | 197 | $wgOut->addHTML( |
199 | 198 | Xml::openElement( 'fieldset' ) . |
200 | 199 | Xml::element( 'legend', null, wfMsg( 'search-external' ) ) . |
201 | 200 | Xml::element( 'p', array( 'class' => 'mw-searchdisabled' ), wfMsg( 'searchdisabled' ) ) . |
202 | 201 | wfMsg( 'googlesearch', |
203 | 202 | htmlspecialchars( $term ), |
204 | | - htmlspecialchars( $wgInputEncoding ), |
| 203 | + htmlspecialchars( 'UTF-8' ), |
205 | 204 | htmlspecialchars( wfMsg( 'searchbutton' ) ) |
206 | 205 | ) . |
207 | 206 | Xml::closeElement( 'fieldset' ) |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -19,14 +19,6 @@ |
20 | 20 | global $wgLanguageNames; |
21 | 21 | require_once( dirname( __FILE__ ) . '/Names.php' ); |
22 | 22 | |
23 | | -global $wgInputEncoding, $wgOutputEncoding; |
24 | | - |
25 | | -/** |
26 | | - * These are always UTF-8, they exist only for backwards compatibility |
27 | | - */ |
28 | | -$wgInputEncoding = 'UTF-8'; |
29 | | -$wgOutputEncoding = 'UTF-8'; |
30 | | - |
31 | 23 | if ( function_exists( 'mb_strtoupper' ) ) { |
32 | 24 | mb_internal_encoding( 'UTF-8' ); |
33 | 25 | } |
Index: trunk/extensions/DumpHTML/dumpHTML.inc |
— | — | @@ -844,8 +844,8 @@ |
845 | 845 | |
846 | 846 | /** Returns image paths used in an XHTML document */ |
847 | 847 | function findImages( $text ) { |
848 | | - global $wgOutputEncoding, $wgDumpImages; |
849 | | - $parser = xml_parser_create( $wgOutputEncoding ); |
| 848 | + global $wgDumpImages; |
| 849 | + $parser = xml_parser_create( 'UTF-8' ); |
850 | 850 | xml_set_element_handler( $parser, 'wfDumpStartTagHandler', 'wfDumpEndTagHandler' ); |
851 | 851 | |
852 | 852 | $wgDumpImages = array(); |
Index: trunk/extensions/Math/Math.body.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | } |
39 | 39 | |
40 | 40 | function render() { |
41 | | - global $wgTmpDirectory, $wgInputEncoding; |
| 41 | + global $wgTmpDirectory; |
42 | 42 | global $wgTexvc, $wgMathCheckFiles, $wgTexvcBackgroundColor; |
43 | 43 | |
44 | 44 | if( $this->mode == MW_MATH_SOURCE ) { |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | escapeshellarg( $wgTmpDirectory ).' '. |
70 | 70 | escapeshellarg( $wgTmpDirectory ).' '. |
71 | 71 | escapeshellarg( $this->tex ).' '. |
72 | | - escapeshellarg( $wgInputEncoding ).' '. |
| 72 | + escapeshellarg( 'UTF-8' ).' '. |
73 | 73 | escapeshellarg( $wgTexvcBackgroundColor ); |
74 | 74 | |
75 | 75 | if ( wfIsWindows() ) { |
Index: trunk/extensions/SemanticNotifyMe/specials/SMWNotifyMe/SMW_NMSendMailAsync.php |
— | — | @@ -55,14 +55,13 @@ |
56 | 56 | if ( ( $user_info->user_email != '' ) && getUserNMOption( $user_info->user_options ) ) { |
57 | 57 | $name = ( ( $user_info->user_real_name == '' ) ? $user_info->user_name:$user_info->user_real_name ); |
58 | 58 | |
59 | | - global $wgOutputEncoding; |
60 | 59 | UserMailer::send( |
61 | 60 | new MailAddress( $user_info->user_email, $name ), |
62 | 61 | new MailAddress( $wgEmergencyContact, 'Admin' ), |
63 | 62 | wfMsg( 'smw_nm_hint_mail_title', $msg['title'], $wgSitename ), |
64 | 63 | wfMsg( 'smw_nm_hint_mail_body_html', $name, $msg['notify'] ), |
65 | 64 | new MailAddress( $wgEmergencyContact, 'Admin' ), |
66 | | - 'text/html; charset=' . $wgOutputEncoding |
| 65 | + 'text/html; charset=UTF-8' |
67 | 66 | ); |
68 | 67 | } |
69 | 68 | } |
Index: trunk/extensions/gis/maparea.php |
— | — | @@ -56,9 +56,8 @@ |
57 | 57 | |
58 | 58 | $wgOut->addWikiText( $this->make_output() ); |
59 | 59 | } else { |
60 | | - global $wgInputEncoding; |
61 | 60 | $ContentType = 'text/x-wiki'; |
62 | | - header( "Content-type: ".$ContentType.'; charset='.$wgInputEncoding); |
| 61 | + header( "Content-type: ".$ContentType.'; charset=UTF-8'); |
63 | 62 | |
64 | 63 | echo( $this->make_output() ); |
65 | 64 | |
Index: trunk/tools/code-utils/check-vars.php |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | // Predefine constant that might not be defined by this file source code |
243 | 243 | $this->mConstants = array( 'PARSEKIT_SIMPLE', 'UNORM_NFC', # Extensions |
244 | 244 | /* Defined in Title.php and GlobalFunctions.php */ |
245 | | - 'GAID_FOR_UPDATE', 'TC_MYSQL', 'TS_UNIX', 'TS_MW', 'TS_DB', 'TS_RFC2822', |
| 245 | + 'TC_MYSQL', 'TS_UNIX', 'TS_MW', 'TS_DB', 'TS_RFC2822', |
246 | 246 | 'TS_ISO_8601', 'TS_EXIF', 'TS_ORACLE', 'TS_POSTGRES', 'TS_DB2', |
247 | 247 | 'TS_ISO_8601_BASIC', |
248 | 248 | /* PHP extensions */ |