Changeset 3156841
- Timestamp:
- 09/24/2024 10:47:46 AM (18 months ago)
- Location:
- de_de/trunk
- Files:
-
- 2 edited
-
de_DE.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
de_de/trunk/de_DE.php
r3100950 r3156841 6 6 * It pre-selects also the German spell checker at TinyMCE and sets the Feed language key. 7 7 * 8 * @version 1.0. 19 * @date 2024-0 6-118 * @version 1.0.2 9 * @date 2024-09-24 10 10 * suggestion by Heiko Rabe (www.code-styling.de), Frank Bueltge (bueltge.de), Thomas Scholz (toscho.de) 11 11 * … … 16 16 * set the RSS language key. 17 17 * Author: Frank Bültge 18 * Version: 1.0. 118 * Version: 1.0.2 19 19 * License: GPLv2+ 20 20 * … … 211 211 return $this->umlautCharsUtf8; 212 212 } 213 $this->umlautCharsUtf8 = (array)apply_filters( 214 'de_DE.utf8', 215 [ 213 214 // PHP 8.2: utf8_decode functions deprecated. 215 // @see: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated 216 if (version_compare(phpversion(), '8.2.0') >= 0) { 217 $defaults = [ 218 mb_convert_encoding('Ä', 'UTF-8', 'ISO-8859-1'), 219 mb_convert_encoding('ä', 'UTF-8', 'ISO-8859-1'), 220 mb_convert_encoding('Ö', 'UTF-8', 'ISO-8859-1'), 221 mb_convert_encoding('ö', 'UTF-8', 'ISO-8859-1'), 222 mb_convert_encoding('Ü', 'UTF-8', 'ISO-8859-1'), 223 mb_convert_encoding('ü', 'UTF-8', 'ISO-8859-1'), 224 mb_convert_encoding('ß', 'UTF-8', 'ISO-8859-1'), 225 mb_convert_encoding('€', 'UTF-8', 'ISO-8859-1'), 226 ]; 227 } else { 228 $defaults = [ 216 229 utf8_encode('Ä'), 217 230 utf8_encode('ä'), … … 222 235 utf8_encode('ß'), 223 236 utf8_encode('€'), 224 ] 237 ]; 238 } 239 240 $this->umlautCharsUtf8 = (array)apply_filters( 241 'de_DE.utf8', 242 $defaults 225 243 ); 226 244 … … 331 349 332 350 // PHP 8.2: utf8_decode functions deprecated. 351 // Will be replaced by: mb_convert_encoding( $utf_string, 'ISO-8859-1', 'UTF-8'); 333 352 // @see: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated 334 353 if (version_compare(phpversion(), '8.2.0') >= 0) { 335 $title = mb_convert_encoding(strtr($title, $invalidLatinChars), 'UTF-8', 'ISO-8859-1'); 354 $title = mb_convert_encoding(strtr($title, $invalidLatinChars), 'ISO-8859-1', 'UTF-8'); // Returns ISO-8859-1 336 355 } else { 337 $title = utf8_decode(strtr($title, $invalidLatinChars)); 356 $title = utf8_decode(strtr($title, $invalidLatinChars)); // Returns ISO-8859-1 338 357 } 339 358 } … … 449 468 chr(226).chr(130).chr(172) => 'EUR', 450 469 ]; 451 $filename = utf8_decode(strtr($filename, $invalidLatinChars)); 470 471 // PHP 8.2: utf8_decode functions deprecated. 472 // @see: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated 473 if (version_compare(phpversion(), '8.2.0') >= 0) { 474 $filename = mb_convert_encoding(strtr($filename, $invalidLatinChars), 'ISO-8859-1', 'UTF-8' ); 475 } else { 476 $filename = utf8_decode(strtr($filename, $invalidLatinChars)); 477 } 452 478 } 453 479 -
de_de/trunk/readme.txt
r3100958 r3156841 4 4 Tags: german, ascii, permalink, umlaut, upload 5 5 Requires at least: 3.5 6 Tested up to: 6. 56 Tested up to: 6.6 7 7 Requires PHP: 5.6 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 54 54 55 55 == Changelog == 56 = 1.0.2 (2024-09-24) = 57 * Updated encoding / decoding via mb_convert_encoding, [#20](https://github.com/bueltge/de-DE/pull/20) 58 56 59 = 1.0.1 (2024-06-11) = 57 60 * Fix deprecated topic for PHP >=8.2
Note: See TracChangeset
for help on using the changeset viewer.