From 1603ed2f22411d98fb8f6162af9a28eb5340c87f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 20 Jan 2010 01:50:16 +0000 Subject: [PATCH] Fixes for r60599: * Split $wgFixArchaicUnicode into two separate variables, one for Malayalam and one for Arabic * Clarified documentation and switched them both on by default * Removed accidentally added variable LanguageAr::$normalizeArray --- RELEASE-NOTES | 5 +++-- includes/DefaultSettings.php | 28 ++++++++++++++++++---------- languages/classes/LanguageAr.php | 6 ++---- languages/classes/LanguageMl.php | 4 ++-- 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3efa86ff8c..a6d71e8675 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -294,8 +294,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 19791) Add URL of file source as comment to thumbs (for ImageMagick) * (bug 21946) Sorted wikitables do not properly handle minus signs * (bug 18885) Red links for media files do not support shared repositories -* Added $wgFixArchaicUnicode, which, if enabled, converts some deprecated - Unicode sequences in Arabic and Malayalam text to their Unicode 5.1 +* Added $wgFixArabicUnicode, to convert deprecated presentation forms in + Arabic text to their modern equivalents, and $wgFixMalayalamUnicode, to + convert ZWJ-based chillu sequences in Malayalam text to their Unicode 5.1 equivalents. * (bug 22051) Returing false in SpecialContributionsBeforeMainOutput hook now stops normal output diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index fd38d3ce87..5f9e8982dc 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -870,17 +870,25 @@ $wgOutputEncoding = 'UTF-8'; $wgEditEncoding = ''; /** - * Set this to true to clean up archaic Unicode sequences in Arabic and - * Malayalam text. Currently only works if $wgLanguageCode is set to Arabic - * or Malayalam. + * Set this to true to replace Arabic presentation forms with their standard + * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is + * set to "ar". * - * Enabling this is generally a good idea for new wikis, since it fixes a few - * technical problems to do with editing these languages. However, if it's - * enabled on an existing wiki, pages which contain the problematic characters - * in their page titles may become inaccessible. Running maintenance/cleanupTitles.php - * after enabling it may fix this. + * Note that pages with titles containing presentation forms will become + * inaccessible, run maintenance/cleanupTitles.php to fix this. */ -$wgFixArchaicUnicode = false; +$wgFixArabicUnicode = true; + +/** + * Set this to true to replace ZWJ-based chillu sequences in Malayalam text + * with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is + * set to "ml". Note that some clients (even new clients as of 2010) do not + * support these characters. + * + * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to + * fix any ZWJ sequences in existing page titles. + */ +$wgFixMalayalamUnicode = true; /** * Locale for LC_CTYPE, to work around http://bugs.php.net/bug.php?id=45132 @@ -4318,4 +4326,4 @@ $wgOldChangeTagsIndex = false; * Extensions can add mwEmbed modules via adding paths to their loader.js to * $wgExtensionJavascriptLoader[] = path/to/loader.js */ -$wgExtensionJavascriptLoader = array(); \ No newline at end of file +$wgExtensionJavascriptLoader = array(); diff --git a/languages/classes/LanguageAr.php b/languages/classes/LanguageAr.php index 2ccc08968d..70a53f8675 100644 --- a/languages/classes/LanguageAr.php +++ b/languages/classes/LanguageAr.php @@ -6,8 +6,6 @@ * @author Niklas Laxström */ class LanguageAr extends Language { - var $normalizeArray; - function convertPlural( $count, $forms ) { if ( !count($forms) ) { return ''; } $forms = $this->preConvertPlural( $forms, 6 ); @@ -36,9 +34,9 @@ class LanguageAr extends Language { * performance impact of enabling it for all languages. */ function normalize( $s ) { - global $wgFixArchaicUnicode; + global $wgFixArabicUnicode; $s = parent::normalize( $s ); - if ( $wgFixArchaicUnicode ) { + if ( $wgFixArabicUnicode ) { $s = $this->transformUsingPairFile( 'normalize-ar.ser', $s ); } return $s; diff --git a/languages/classes/LanguageMl.php b/languages/classes/LanguageMl.php index 316ea81a51..98b5fc961c 100644 --- a/languages/classes/LanguageMl.php +++ b/languages/classes/LanguageMl.php @@ -12,9 +12,9 @@ class LanguageMl extends Language { * performance impact of enabling it for all languages. */ function normalize( $s ) { - global $wgFixArchaicUnicode; + global $wgFixMalayalamUnicode; $s = parent::normalize( $s ); - if ( $wgFixArchaicUnicode ) { + if ( $wgFixMalayalamUnicode ) { $s = $this->transformUsingPairFile( 'normalize-ml.ser', $s ); } return $s; -- 2.20.1