Page MenuHomePhabricator

− in page text does not display properly with Monobook and Chick skins
Closed, DeclinedPublic

Description

Author: JArmistead

Description:
The − HTML entity is converted in includes\Sanitizer.php into Unicode 2212 (hex) / 8722
(decimal).

On my Windows XP SP2, Internet Explorer 6 (with all patches) system with basically default
settings for IE6, it appears as a square box. I think this suggests that IE (or Windows)
couldn't find the appropriate character in its font tables. It renders OK in Firefox. Both
browsers recognise the page as UTF-8 encoding.

It appears that this is a problem in the Monobook and Chick (which is just a Monobook wannabe)
skins, but not, in all the other skins, e.g. the Simple skin. Because Monobook is the default
skin, this exacerbates the problem.

I notice that skins\monobook\main.css says

body {

font: x-small sans-serif;
background: #f9f9f9 url(headbg.jpg) 0 0 no-repeat;
color: black;
margin: 0;
padding: 0;

}

and Microsoft itself notes that its sans-serif font is perhaps not one of the most Unicode-
friendly fonts.

http://www.microsoft.com/globaldev/getwr/steps/wrg_font.mspx

How do we handle this nicely ? I don't know. But having the browser fail to render properly
for simple math expressions on a page, or in articles referring to negative temperatures, etc,
does not seem very good. I was looking at an article on the RMS Titanic and had to do a
double-take on some of the temperatures quoted in the article, until I realised those small
boxes on the page were actually supposed to be minus signs.

Over to the more experienced Mediawiki / HTML / CSS / Unicode hackers out there


Version: 1.5.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz4757

Event Timeline

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

Well, it sure _should_ work, as according to spec − expands to −:

http://www.w3.org/TR/html4/sgml/entities.html
<!ENTITY minus CDATA "&#8722;" -- minus sign, U+2212 ISOtech -->

http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters
<!ENTITY minus "&#8722;"> <!-- minus sign, U+2212 ISOtech -->

I don't see anything obviously amiss at http://en.wikipedia.org/wiki/RMS_Titanic
in IE 6.0 on XP SP2. Can you provide a URL to a problem page and attach a screen
shot to this bug?

JArmistead wrote:

The bug occurs on the RMS Titanic page in the section entitled "The rediscovery of Titanic"

The paragraph below is one that I noticed this on:

"The samples of steel rescued from the wrecked hull were found to have very high content of
phosphorus and sulphur (four times and two times as high as common for modern steels), with a
manganese-sulphur ratio of 6.8:1 (compare with over 200:1 ratio for modern steels). High
content of phosphorus initiates fractures, sulphur forms grains of iron sulphide that
facilitate propagation of cracks, and lack of manganese makes the steel less ductile. The
recovered samples were found to be undergoing ductile-brittle transition in temperatures of 32
°C (for longitudinal samples) and 56 °C (for transversal samples—compare with transition
temperature of −27 °C common for modern steels—modern steel would become as brittle between
−60 and −70 °C). The anisotropy was likely caused by hot rolling influencing the orientation
of the sulphide stringer inclusions. The steel was probably produced in the acid-lined, open-
hearth furnaces in Glasgow, which would explain the high content of phosphorus and sulphur,
even for the times. [12]"

Yet you will notice that when I cut and paste this into Bugzilla, the minus signs are OK (so
presumably the Bugzilla font selection is different).

I have attached a screen capture of what I see on my PC. Hopefully this sheds some light on
what is going on.

JArmistead wrote:

Screen shot showing incorrect rendering of &#8722; (&minus)

Attached:

RMS_Titanic.gif (495×697 px, 39 KB)

stanley wrote:

the character works fine on firefox.

Created attachment 1325
Screen shot of same page in MSIE 6 on XP SP2, looks fine

Looks fine here. MSIE 6, Windows XP SP 2. Tried both not-logged-in and logged
in.

Attached:

RMS_Titanic_in_MSIE_6_on_XP_SP2.png (728×915 px, 133 KB)

JArmistead wrote:

OK, it gets even weirder.

Looking at article

http://en.wikipedia.org/wiki/Minus

PC # 1 has Windows XP SP2, IE 6 SP2 (Help About gives Version: 6.0.2900.2180.xpsp_sp2_gdr.050301-
1519). Video card is an ATI Radeon 9600XT driving a 1280 * 1024 LCD screen using Normal font size.

In that article, in the "History" section, where &minus; is surrounded by triple single-
quotes '''&minus;''' it appears on my screen OK.

Further down, in the "In computing" section, in the table it appears as the box (that one being a
unicode character enclosed in <nowiki> </nowiki> tags.

PC # 2 (a VERY nice Dell C840 notebook) has Windows 2000 SP4, IE 5.5 SP2 (Help About gives
Version: 5.59,4807.2300). Video card is an Nvidia GeForce4 440 Go driving a 1600 * 1200 LCD panel
and using Large Fonts in the Display settings.

In that article, all the minus signs appear OK, but in the section "Alternate uses" section, the
bulleted list "Plus can mean:" all the logical symbols shown inside the brackets "(usually
written )" do not appear.

Strangely, on PC # 1, those symbols DO appear.

Something VERY weird is going on here !!!

I tried changing IE's View -> Text Size setting to see if that had something to do with it.

Can someone tell me what EXACT versions of IE they are using ?

And can someone tell me what EXACT fonts are being requested by Mediawiki, and then what EXACT
versions of those fonts are installed on your PCs ?