Page MenuHomePhabricator

Charset problem with date in signatures
Closed, ResolvedPublic

Description

Author: mr-smoke

Description:
When using the ~~~~ or ~~~~~ on a localised system (French in my case), it *seems* that the produced string is ISO-8859-1 encoded regardless of PHP's setting. As a result, the string for "summer time" being "heure d'été", the "é" appear as � when read the UTF-8 way.

Since the default charset should now be UTF-8, may I suggest that in Parser.php, lines 3701-3702

		$d = $wgContLang->timeanddate( date( 'YmdHis' ), false, false) .
		  ' (' . date( 'T' ) . ')';

be changed to

		$d = $wgContLang->timeanddate( date( 'YmdHis' ), false, false) .
		  ' (' . utf8_encode(date( 'T' )) . ')';

?

This "Works For Me (tm)", and I don't think it would break much ...

Regards.


Version: 1.10.x
Severity: minor
OS: Windows Server 2003
Platform: PC

Details

Reference
bz10445

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:49 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz10445.
bzimport added a subscriber: Unknown Object (MLST).

utf8_encode() unfortunately would be specific to Latin-1 locales; this issue exists on Windows for other languages and charsets as well.

It may or may not be possible to get clean info out of the system for this; or else make some estimates...

  • This bug has been marked as a duplicate of bug 751 ***