php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63991 Accents on uppercase Greek vowels hidden by PHP.net's fonts
Submitted: 2013-01-15 13:59 UTC Modified: 2014-12-30 02:30 UTC
From: php at hatzidakis dot org Assigned: aharvey (profile)
Status: Closed Package: Website problem
PHP Version: Irrelevant OS: Windows 7 Ultimate 64bit
Private report: No CVE-ID: None
 [2013-01-15 13:59 UTC] php at hatzidakis dot org
Description:
------------
On Firefox, the font Consolas that PHP.net is using within <code> tags such as in code examples, seems to be hiding the accents from uppercase Greek vowels. This issue does not appear on Internet Explorer or Chrome.

Tested Firefox versions v15.0 and v17.01 official binaries on Windows 7 64bit and v12 and v18 on Windows XP. 


Although this is supported by UTF-8, uppercase Greek vowels must not have accents. It is thus important to be able to distinguish whether a sentence in uppercase Greek has accents or not on its vowels.

The example #2 given in http://php.net/mb_convert_case:


<?php
$str = "Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός";
$str = mb_convert_case($str, MB_CASE_UPPER, "UTF-8");
echo $str; // Prints ΤΆΧΙΣΤΗ ΑΛΏΠΗΞ ΒΑΦΉΣ ΨΗΜΈΝΗ ΓΗ, ΔΡΑΣΚΕΛΊΖΕΙ ΥΠΈΡ ΝΩΘΡΟΎ ΚΥΝΌΣ
$str = mb_convert_case($str, MB_CASE_TITLE, "UTF-8");
echo $str; // Prints Τάχιστη Αλώπηξ Βαφήσ Ψημένη Γη, Δρασκελίζει Υπέρ Νωθρού Κυνόσ
?>

when viewed on Firefox doesn't include the accents on the capitalized vowels that show the function's effect in uppercasing Greek text. This may confuse developers into thinking the function also removes accents when uppercasing Greek vowels.

Copying the example text and pasting it into a text editor makes the accents appear as normal.

Test script:
---------------
Just view example #2 on http://php.net/mb_convert_case or paste and view this simple html file:


<html>
	<head>
		<title>test</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<style type="text/css">

		* {
			font-family: Consolas ;
			font-size: x-large;
		}

		</style>
	</head>

	<body>
		ΤΆΧΙΣΤΗ ΑΛΏΠΗΞ ΒΑΦΉΣ ΨΗΜΈΝΗ ΓΗ, ΔΡΑΣΚΕΛΊΖΕΙ ΥΠΈΡ ΝΩΘΡΟΎ ΚΥΝΌΣ
	</body>
</html>

Expected result:
----------------
I expect the display to be:

ΤΆΧΙΣΤΗ ΑΛΏΠΗΞ ΒΑΦΉΣ ΨΗΜΈΝΗ ΓΗ, ΔΡΑΣΚΕΛΊΖΕΙ ΥΠΈΡ ΝΩΘΡΟΎ ΚΥΝΌΣ

Actual result:
--------------
The display is instead:

ΤΑΧΙΣΤΗ ΑΛΩΠΗΞ ΒΑΦΗΣ ΨΗΜΕΝΗ ΓΗ, ΔΡΑΣΚΕΛΙΖΕΙ ΥΠΕΡ ΝΩΘΡΟΥ ΚΥΝΟΣ

NOTE: this is just how it looks due to the fonts. Copying the text into an editor reveals the hidden accents.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-16 01:40 UTC] aharvey@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: aharvey
 [2013-01-16 01:40 UTC] aharvey@php.net
Does this happen on the beta site: http://au1.php.net/manual/en/function.mb-convert-case.php?beta=1 ? We could just reuse the code styling from there as a stopgap if it's OK.

Since I wrote the original example (bug #51858), the reasoning was that Greek was a non-Latin alphabet that virtually everyone has font support for: I'd rather fix the font issue than switch to something in, say, Cyrillic.
 [2013-01-16 08:17 UTC] php at hatzidakis dot org
-Status: Feedback +Status: Assigned
 [2013-01-16 08:17 UTC] php at hatzidakis dot org
It looks OK on the beta site, as that one uses the Monospace font-family. The accents are visible as expected.
 [2014-12-28 06:11 UTC] jacob dot bednarz at gmail dot com
This was last touched in 2012 and appears to be fixed since the beta release of the PHP.net site. Can this be closed?
 [2014-12-30 02:30 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2014-12-30 02:30 UTC] aharvey@php.net
Yep, looks like either the switch to the new layout or a more recent version of Firefox on Windows fixed this. Either way, let's call this good.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC